@composio/core 0.25.0 → 0.27.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.
Files changed (37) hide show
  1. package/dist/{CustomTool-DZY1yLHN.d.mts → CustomTool-CqPoLUD6.d.mts} +1 -1
  2. package/dist/{cancellation-D-tMPk48.mjs → cancellation-ZoRh6EJQ.mjs} +54 -2
  3. package/dist/{composio-B8AENilE.d.mts → composio-BUa10iB3.d.mts} +65 -57
  4. package/dist/{customTool.types-Bi6-keZC.d.mts → customTool.types-gX421uPT.d.mts} +789 -33
  5. package/dist/docs/reference/sdk-reference/typescript/composio.mdx +3 -3
  6. package/dist/docs/reference/sdk-reference/typescript/session.mdx +2 -1
  7. package/dist/docs/reference/sdk-reference/typescript/triggers.mdx +5 -1
  8. package/dist/experimental/index.d.mts +2 -2
  9. package/dist/index.d.mts +18 -13
  10. package/dist/index.mjs +6787 -6316
  11. package/dist/{types-BGDMkEUl.d.mts → types-DXxfzBX3.d.mts} +2 -2
  12. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
  13. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
  14. package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
  15. package/dist/utils/modifiers/FileToolModifier.node.mjs +1 -1
  16. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
  17. package/package.json +3 -3
  18. package/src/composio.ts +68 -57
  19. package/src/lib/toolRouterMcp.ts +2 -0
  20. package/src/lib/toolRouterParams.ts +26 -3
  21. package/src/models/ConnectedAccounts.ts +7 -16
  22. package/src/models/SessionContext.ts +2 -17
  23. package/src/models/ToolRouter.ts +9 -2
  24. package/src/models/ToolRouterSession.ts +4 -19
  25. package/src/models/Tools.ts +1 -4
  26. package/src/models/Triggers.ts +6 -1
  27. package/src/services/internal/InternalService.ts +3 -4
  28. package/src/services/pusher/Pusher.ts +11 -4
  29. package/src/types/connectedAccountAuthStates.types.ts +2 -1
  30. package/src/types/requestOptions.types.ts +1 -10
  31. package/src/types/toolRouter.types.ts +156 -11
  32. package/src/utils/jsonSchema.ts +76 -4
  33. package/src/utils/sdk.ts +172 -11
  34. package/src/utils/toolkitDeprecation.ts +271 -0
  35. package/src/utils/transformers/connectedAccounts.ts +9 -20
  36. package/src/utils/transformers/mcp.ts +3 -10
  37. package/src/utils/transformers/toolRouterResponseTransform.ts +123 -5
@@ -1111,7 +1111,7 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
1111
1111
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
1112
1112
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
1113
1113
  } & {
1114
- access_token: z$1.ZodOptional<z$1.ZodString>;
1114
+ access_token: z$1.ZodString;
1115
1115
  id_token: z$1.ZodOptional<z$1.ZodString>;
1116
1116
  token_type: z$1.ZodOptional<z$1.ZodString>;
1117
1117
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -1150,7 +1150,7 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
1150
1150
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
1151
1151
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
1152
1152
  } & {
1153
- access_token: z$1.ZodOptional<z$1.ZodString>;
1153
+ access_token: z$1.ZodString;
1154
1154
  id_token: z$1.ZodOptional<z$1.ZodString>;
1155
1155
  token_type: z$1.ZodOptional<z$1.ZodString>;
1156
1156
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -1189,7 +1189,7 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
1189
1189
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
1190
1190
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
1191
1191
  } & {
1192
- access_token: z$1.ZodOptional<z$1.ZodString>;
1192
+ access_token: z$1.ZodString;
1193
1193
  id_token: z$1.ZodOptional<z$1.ZodString>;
1194
1194
  token_type: z$1.ZodOptional<z$1.ZodString>;
1195
1195
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -1200,6 +1200,7 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
1200
1200
  authScheme: "S2S_OAUTH2";
1201
1201
  toolkitSlug: string;
1202
1202
  val: {
1203
+ access_token: string;
1203
1204
  version?: string | undefined;
1204
1205
  "your-domain"?: string | undefined;
1205
1206
  subdomain?: string | undefined;
@@ -1231,7 +1232,6 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
1231
1232
  registration_access_token?: string | undefined;
1232
1233
  registration_client_uri?: string | undefined;
1233
1234
  composio_link_redirect_url?: string | undefined;
1234
- access_token?: string | undefined;
1235
1235
  id_token?: string | undefined;
1236
1236
  token_type?: string | undefined;
1237
1237
  refresh_token?: string | null | undefined;
@@ -1244,6 +1244,7 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
1244
1244
  authScheme: "S2S_OAUTH2";
1245
1245
  toolkitSlug: string;
1246
1246
  val: {
1247
+ access_token: string;
1247
1248
  version?: string | undefined;
1248
1249
  "your-domain"?: string | undefined;
1249
1250
  subdomain?: string | undefined;
@@ -1275,7 +1276,6 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
1275
1276
  registration_access_token?: string | undefined;
1276
1277
  registration_client_uri?: string | undefined;
1277
1278
  composio_link_redirect_url?: string | undefined;
1278
- access_token?: string | undefined;
1279
1279
  id_token?: string | undefined;
1280
1280
  token_type?: string | undefined;
1281
1281
  refresh_token?: string | null | undefined;
@@ -2868,6 +2868,7 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
2868
2868
  authScheme: "S2S_OAUTH2";
2869
2869
  toolkitSlug: string;
2870
2870
  val: {
2871
+ access_token: string;
2871
2872
  version?: string | undefined;
2872
2873
  "your-domain"?: string | undefined;
2873
2874
  subdomain?: string | undefined;
@@ -2899,7 +2900,6 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
2899
2900
  registration_access_token?: string | undefined;
2900
2901
  registration_client_uri?: string | undefined;
2901
2902
  composio_link_redirect_url?: string | undefined;
2902
- access_token?: string | undefined;
2903
2903
  id_token?: string | undefined;
2904
2904
  token_type?: string | undefined;
2905
2905
  refresh_token?: string | null | undefined;
@@ -3299,6 +3299,7 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
3299
3299
  authScheme: "S2S_OAUTH2";
3300
3300
  toolkitSlug: string;
3301
3301
  val: {
3302
+ access_token: string;
3302
3303
  version?: string | undefined;
3303
3304
  "your-domain"?: string | undefined;
3304
3305
  subdomain?: string | undefined;
@@ -3330,7 +3331,6 @@ declare const ToolExecuteParamsSchema: z$1.ZodObject<{
3330
3331
  registration_access_token?: string | undefined;
3331
3332
  registration_client_uri?: string | undefined;
3332
3333
  composio_link_redirect_url?: string | undefined;
3333
- access_token?: string | undefined;
3334
3334
  id_token?: string | undefined;
3335
3335
  token_type?: string | undefined;
3336
3336
  refresh_token?: string | null | undefined;
@@ -4021,7 +4021,7 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
4021
4021
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
4022
4022
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
4023
4023
  } & {
4024
- access_token: z$1.ZodOptional<z$1.ZodString>;
4024
+ access_token: z$1.ZodString;
4025
4025
  id_token: z$1.ZodOptional<z$1.ZodString>;
4026
4026
  token_type: z$1.ZodOptional<z$1.ZodString>;
4027
4027
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -4060,7 +4060,7 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
4060
4060
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
4061
4061
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
4062
4062
  } & {
4063
- access_token: z$1.ZodOptional<z$1.ZodString>;
4063
+ access_token: z$1.ZodString;
4064
4064
  id_token: z$1.ZodOptional<z$1.ZodString>;
4065
4065
  token_type: z$1.ZodOptional<z$1.ZodString>;
4066
4066
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -4099,7 +4099,7 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
4099
4099
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
4100
4100
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
4101
4101
  } & {
4102
- access_token: z$1.ZodOptional<z$1.ZodString>;
4102
+ access_token: z$1.ZodString;
4103
4103
  id_token: z$1.ZodOptional<z$1.ZodString>;
4104
4104
  token_type: z$1.ZodOptional<z$1.ZodString>;
4105
4105
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -4110,6 +4110,7 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
4110
4110
  authScheme: "S2S_OAUTH2";
4111
4111
  toolkitSlug: string;
4112
4112
  val: {
4113
+ access_token: string;
4113
4114
  version?: string | undefined;
4114
4115
  "your-domain"?: string | undefined;
4115
4116
  subdomain?: string | undefined;
@@ -4141,7 +4142,6 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
4141
4142
  registration_access_token?: string | undefined;
4142
4143
  registration_client_uri?: string | undefined;
4143
4144
  composio_link_redirect_url?: string | undefined;
4144
- access_token?: string | undefined;
4145
4145
  id_token?: string | undefined;
4146
4146
  token_type?: string | undefined;
4147
4147
  refresh_token?: string | null | undefined;
@@ -4154,6 +4154,7 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
4154
4154
  authScheme: "S2S_OAUTH2";
4155
4155
  toolkitSlug: string;
4156
4156
  val: {
4157
+ access_token: string;
4157
4158
  version?: string | undefined;
4158
4159
  "your-domain"?: string | undefined;
4159
4160
  subdomain?: string | undefined;
@@ -4185,7 +4186,6 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
4185
4186
  registration_access_token?: string | undefined;
4186
4187
  registration_client_uri?: string | undefined;
4187
4188
  composio_link_redirect_url?: string | undefined;
4188
- access_token?: string | undefined;
4189
4189
  id_token?: string | undefined;
4190
4190
  token_type?: string | undefined;
4191
4191
  refresh_token?: string | null | undefined;
@@ -5770,6 +5770,7 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
5770
5770
  authScheme: "S2S_OAUTH2";
5771
5771
  toolkitSlug: string;
5772
5772
  val: {
5773
+ access_token: string;
5773
5774
  version?: string | undefined;
5774
5775
  "your-domain"?: string | undefined;
5775
5776
  subdomain?: string | undefined;
@@ -5801,7 +5802,6 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
5801
5802
  registration_access_token?: string | undefined;
5802
5803
  registration_client_uri?: string | undefined;
5803
5804
  composio_link_redirect_url?: string | undefined;
5804
- access_token?: string | undefined;
5805
5805
  id_token?: string | undefined;
5806
5806
  token_type?: string | undefined;
5807
5807
  refresh_token?: string | null | undefined;
@@ -6195,6 +6195,7 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
6195
6195
  authScheme: "S2S_OAUTH2";
6196
6196
  toolkitSlug: string;
6197
6197
  val: {
6198
+ access_token: string;
6198
6199
  version?: string | undefined;
6199
6200
  "your-domain"?: string | undefined;
6200
6201
  subdomain?: string | undefined;
@@ -6226,7 +6227,6 @@ declare const ToolProxyParamsSchema: z$1.ZodObject<{
6226
6227
  registration_access_token?: string | undefined;
6227
6228
  registration_client_uri?: string | undefined;
6228
6229
  composio_link_redirect_url?: string | undefined;
6229
- access_token?: string | undefined;
6230
6230
  id_token?: string | undefined;
6231
6231
  token_type?: string | undefined;
6232
6232
  refresh_token?: string | null | undefined;
@@ -26882,7 +26882,7 @@ declare const CustomConnectionDataSchema: z$1.ZodDiscriminatedUnion<"authScheme"
26882
26882
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
26883
26883
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
26884
26884
  } & {
26885
- access_token: z$1.ZodOptional<z$1.ZodString>;
26885
+ access_token: z$1.ZodString;
26886
26886
  id_token: z$1.ZodOptional<z$1.ZodString>;
26887
26887
  token_type: z$1.ZodOptional<z$1.ZodString>;
26888
26888
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -26921,7 +26921,7 @@ declare const CustomConnectionDataSchema: z$1.ZodDiscriminatedUnion<"authScheme"
26921
26921
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
26922
26922
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
26923
26923
  } & {
26924
- access_token: z$1.ZodOptional<z$1.ZodString>;
26924
+ access_token: z$1.ZodString;
26925
26925
  id_token: z$1.ZodOptional<z$1.ZodString>;
26926
26926
  token_type: z$1.ZodOptional<z$1.ZodString>;
26927
26927
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -26960,7 +26960,7 @@ declare const CustomConnectionDataSchema: z$1.ZodDiscriminatedUnion<"authScheme"
26960
26960
  registration_client_uri: z$1.ZodOptional<z$1.ZodString>;
26961
26961
  composio_link_redirect_url: z$1.ZodOptional<z$1.ZodString>;
26962
26962
  } & {
26963
- access_token: z$1.ZodOptional<z$1.ZodString>;
26963
+ access_token: z$1.ZodString;
26964
26964
  id_token: z$1.ZodOptional<z$1.ZodString>;
26965
26965
  token_type: z$1.ZodOptional<z$1.ZodString>;
26966
26966
  refresh_token: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
@@ -26971,6 +26971,7 @@ declare const CustomConnectionDataSchema: z$1.ZodDiscriminatedUnion<"authScheme"
26971
26971
  authScheme: "S2S_OAUTH2";
26972
26972
  toolkitSlug: string;
26973
26973
  val: {
26974
+ access_token: string;
26974
26975
  version?: string | undefined;
26975
26976
  "your-domain"?: string | undefined;
26976
26977
  subdomain?: string | undefined;
@@ -27002,7 +27003,6 @@ declare const CustomConnectionDataSchema: z$1.ZodDiscriminatedUnion<"authScheme"
27002
27003
  registration_access_token?: string | undefined;
27003
27004
  registration_client_uri?: string | undefined;
27004
27005
  composio_link_redirect_url?: string | undefined;
27005
- access_token?: string | undefined;
27006
27006
  id_token?: string | undefined;
27007
27007
  token_type?: string | undefined;
27008
27008
  refresh_token?: string | null | undefined;
@@ -27015,6 +27015,7 @@ declare const CustomConnectionDataSchema: z$1.ZodDiscriminatedUnion<"authScheme"
27015
27015
  authScheme: "S2S_OAUTH2";
27016
27016
  toolkitSlug: string;
27017
27017
  val: {
27018
+ access_token: string;
27018
27019
  version?: string | undefined;
27019
27020
  "your-domain"?: string | undefined;
27020
27021
  subdomain?: string | undefined;
@@ -27046,7 +27047,6 @@ declare const CustomConnectionDataSchema: z$1.ZodDiscriminatedUnion<"authScheme"
27046
27047
  registration_access_token?: string | undefined;
27047
27048
  registration_client_uri?: string | undefined;
27048
27049
  composio_link_redirect_url?: string | undefined;
27049
- access_token?: string | undefined;
27050
27050
  id_token?: string | undefined;
27051
27051
  token_type?: string | undefined;
27052
27052
  refresh_token?: string | null | undefined;
@@ -30843,6 +30843,160 @@ declare const ToolRouterProxyExecuteSchema: z.ZodUnion<[z.ZodBoolean, z.ZodObjec
30843
30843
  enable: boolean;
30844
30844
  }>]>;
30845
30845
  type ToolRouterProxyExecute = z.infer<typeof ToolRouterProxyExecuteSchema>;
30846
+ /** Which tool calls a hook runs on: `'all'`, or only calls to the listed toolkits (including their proxy calls). */
30847
+ declare const ToolRouterHookAppliesToSchema: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodObject<{
30848
+ toolkits: z.ZodArray<z.ZodString, "many">;
30849
+ }, "strict", z.ZodTypeAny, {
30850
+ toolkits: string[];
30851
+ }, {
30852
+ toolkits: string[];
30853
+ }>]>;
30854
+ type ToolRouterHookAppliesTo = z.infer<typeof ToolRouterHookAppliesToSchema>;
30855
+ /** Blocks a call or result when it matches `condition`, a plain sentence describing what to block. */
30856
+ declare const ToolRouterHookConditionCheckHandlerSchema: z.ZodObject<{
30857
+ type: z.ZodLiteral<"condition_check">;
30858
+ condition: z.ZodString;
30859
+ action: z.ZodLiteral<"block">;
30860
+ }, "strict", z.ZodTypeAny, {
30861
+ type: "condition_check";
30862
+ condition: string;
30863
+ action: "block";
30864
+ }, {
30865
+ type: "condition_check";
30866
+ condition: string;
30867
+ action: "block";
30868
+ }>;
30869
+ type ToolRouterHookConditionCheckHandler = z.infer<typeof ToolRouterHookConditionCheckHandlerSchema>;
30870
+ /** A pre-defined check that blocks results with text that tries to give the agent instructions. */
30871
+ declare const ToolRouterHookPromptInjectionCheckHandlerSchema: z.ZodObject<{
30872
+ type: z.ZodLiteral<"prompt_injection_check">;
30873
+ action: z.ZodLiteral<"block">;
30874
+ }, "strict", z.ZodTypeAny, {
30875
+ type: "prompt_injection_check";
30876
+ action: "block";
30877
+ }, {
30878
+ type: "prompt_injection_check";
30879
+ action: "block";
30880
+ }>;
30881
+ type ToolRouterHookPromptInjectionCheckHandler = z.infer<typeof ToolRouterHookPromptInjectionCheckHandlerSchema>;
30882
+ /**
30883
+ * A hook on a session's tool calls. A `before_execute` hook can block a call
30884
+ * before it runs; an `after_execute` hook can block its result before the
30885
+ * agent sees it.
30886
+ */
30887
+ declare const ToolRouterHookSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
30888
+ handler: z.ZodObject<{
30889
+ type: z.ZodLiteral<"condition_check">;
30890
+ condition: z.ZodString;
30891
+ action: z.ZodLiteral<"block">;
30892
+ }, "strict", z.ZodTypeAny, {
30893
+ type: "condition_check";
30894
+ condition: string;
30895
+ action: "block";
30896
+ }, {
30897
+ type: "condition_check";
30898
+ condition: string;
30899
+ action: "block";
30900
+ }>;
30901
+ id: z.ZodString;
30902
+ name: z.ZodOptional<z.ZodString>;
30903
+ appliesTo: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodObject<{
30904
+ toolkits: z.ZodArray<z.ZodString, "many">;
30905
+ }, "strict", z.ZodTypeAny, {
30906
+ toolkits: string[];
30907
+ }, {
30908
+ toolkits: string[];
30909
+ }>]>;
30910
+ type: z.ZodLiteral<"before_execute">;
30911
+ }, "strict", z.ZodTypeAny, {
30912
+ type: "before_execute";
30913
+ id: string;
30914
+ handler: {
30915
+ type: "condition_check";
30916
+ condition: string;
30917
+ action: "block";
30918
+ };
30919
+ appliesTo: "all" | {
30920
+ toolkits: string[];
30921
+ };
30922
+ name?: string | undefined;
30923
+ }, {
30924
+ type: "before_execute";
30925
+ id: string;
30926
+ handler: {
30927
+ type: "condition_check";
30928
+ condition: string;
30929
+ action: "block";
30930
+ };
30931
+ appliesTo: "all" | {
30932
+ toolkits: string[];
30933
+ };
30934
+ name?: string | undefined;
30935
+ }>, z.ZodObject<{
30936
+ handler: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
30937
+ type: z.ZodLiteral<"condition_check">;
30938
+ condition: z.ZodString;
30939
+ action: z.ZodLiteral<"block">;
30940
+ }, "strict", z.ZodTypeAny, {
30941
+ type: "condition_check";
30942
+ condition: string;
30943
+ action: "block";
30944
+ }, {
30945
+ type: "condition_check";
30946
+ condition: string;
30947
+ action: "block";
30948
+ }>, z.ZodObject<{
30949
+ type: z.ZodLiteral<"prompt_injection_check">;
30950
+ action: z.ZodLiteral<"block">;
30951
+ }, "strict", z.ZodTypeAny, {
30952
+ type: "prompt_injection_check";
30953
+ action: "block";
30954
+ }, {
30955
+ type: "prompt_injection_check";
30956
+ action: "block";
30957
+ }>]>;
30958
+ id: z.ZodString;
30959
+ name: z.ZodOptional<z.ZodString>;
30960
+ appliesTo: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodObject<{
30961
+ toolkits: z.ZodArray<z.ZodString, "many">;
30962
+ }, "strict", z.ZodTypeAny, {
30963
+ toolkits: string[];
30964
+ }, {
30965
+ toolkits: string[];
30966
+ }>]>;
30967
+ type: z.ZodLiteral<"after_execute">;
30968
+ }, "strict", z.ZodTypeAny, {
30969
+ type: "after_execute";
30970
+ id: string;
30971
+ handler: {
30972
+ type: "condition_check";
30973
+ condition: string;
30974
+ action: "block";
30975
+ } | {
30976
+ type: "prompt_injection_check";
30977
+ action: "block";
30978
+ };
30979
+ appliesTo: "all" | {
30980
+ toolkits: string[];
30981
+ };
30982
+ name?: string | undefined;
30983
+ }, {
30984
+ type: "after_execute";
30985
+ id: string;
30986
+ handler: {
30987
+ type: "condition_check";
30988
+ condition: string;
30989
+ action: "block";
30990
+ } | {
30991
+ type: "prompt_injection_check";
30992
+ action: "block";
30993
+ };
30994
+ appliesTo: "all" | {
30995
+ toolkits: string[];
30996
+ };
30997
+ name?: string | undefined;
30998
+ }>]>;
30999
+ type ToolRouterHook = z.infer<typeof ToolRouterHookSchema>;
30846
31000
  declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
30847
31001
  sessionPreset: z.ZodOptional<z.ZodOptional<z.ZodLiteral<"direct_tools">>>;
30848
31002
  mcp: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -31111,6 +31265,118 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31111
31265
  }, {
31112
31266
  enable: boolean;
31113
31267
  }>]>>>;
31268
+ hooks: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
31269
+ handler: z.ZodObject<{
31270
+ type: z.ZodLiteral<"condition_check">;
31271
+ condition: z.ZodString;
31272
+ action: z.ZodLiteral<"block">;
31273
+ }, "strict", z.ZodTypeAny, {
31274
+ type: "condition_check";
31275
+ condition: string;
31276
+ action: "block";
31277
+ }, {
31278
+ type: "condition_check";
31279
+ condition: string;
31280
+ action: "block";
31281
+ }>;
31282
+ id: z.ZodString;
31283
+ name: z.ZodOptional<z.ZodString>;
31284
+ appliesTo: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodObject<{
31285
+ toolkits: z.ZodArray<z.ZodString, "many">;
31286
+ }, "strict", z.ZodTypeAny, {
31287
+ toolkits: string[];
31288
+ }, {
31289
+ toolkits: string[];
31290
+ }>]>;
31291
+ type: z.ZodLiteral<"before_execute">;
31292
+ }, "strict", z.ZodTypeAny, {
31293
+ type: "before_execute";
31294
+ id: string;
31295
+ handler: {
31296
+ type: "condition_check";
31297
+ condition: string;
31298
+ action: "block";
31299
+ };
31300
+ appliesTo: "all" | {
31301
+ toolkits: string[];
31302
+ };
31303
+ name?: string | undefined;
31304
+ }, {
31305
+ type: "before_execute";
31306
+ id: string;
31307
+ handler: {
31308
+ type: "condition_check";
31309
+ condition: string;
31310
+ action: "block";
31311
+ };
31312
+ appliesTo: "all" | {
31313
+ toolkits: string[];
31314
+ };
31315
+ name?: string | undefined;
31316
+ }>, z.ZodObject<{
31317
+ handler: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
31318
+ type: z.ZodLiteral<"condition_check">;
31319
+ condition: z.ZodString;
31320
+ action: z.ZodLiteral<"block">;
31321
+ }, "strict", z.ZodTypeAny, {
31322
+ type: "condition_check";
31323
+ condition: string;
31324
+ action: "block";
31325
+ }, {
31326
+ type: "condition_check";
31327
+ condition: string;
31328
+ action: "block";
31329
+ }>, z.ZodObject<{
31330
+ type: z.ZodLiteral<"prompt_injection_check">;
31331
+ action: z.ZodLiteral<"block">;
31332
+ }, "strict", z.ZodTypeAny, {
31333
+ type: "prompt_injection_check";
31334
+ action: "block";
31335
+ }, {
31336
+ type: "prompt_injection_check";
31337
+ action: "block";
31338
+ }>]>;
31339
+ id: z.ZodString;
31340
+ name: z.ZodOptional<z.ZodString>;
31341
+ appliesTo: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodObject<{
31342
+ toolkits: z.ZodArray<z.ZodString, "many">;
31343
+ }, "strict", z.ZodTypeAny, {
31344
+ toolkits: string[];
31345
+ }, {
31346
+ toolkits: string[];
31347
+ }>]>;
31348
+ type: z.ZodLiteral<"after_execute">;
31349
+ }, "strict", z.ZodTypeAny, {
31350
+ type: "after_execute";
31351
+ id: string;
31352
+ handler: {
31353
+ type: "condition_check";
31354
+ condition: string;
31355
+ action: "block";
31356
+ } | {
31357
+ type: "prompt_injection_check";
31358
+ action: "block";
31359
+ };
31360
+ appliesTo: "all" | {
31361
+ toolkits: string[];
31362
+ };
31363
+ name?: string | undefined;
31364
+ }, {
31365
+ type: "after_execute";
31366
+ id: string;
31367
+ handler: {
31368
+ type: "condition_check";
31369
+ condition: string;
31370
+ action: "block";
31371
+ } | {
31372
+ type: "prompt_injection_check";
31373
+ action: "block";
31374
+ };
31375
+ appliesTo: "all" | {
31376
+ toolkits: string[];
31377
+ };
31378
+ name?: string | undefined;
31379
+ }>]>, "many">>>;
31114
31380
  preload: z.ZodOptional<z.ZodOptional<z.ZodObject<{
31115
31381
  tools: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodLiteral<"all">]>>;
31116
31382
  }, "strict", z.ZodTypeAny, {
@@ -31230,6 +31496,34 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31230
31496
  proxyExecute?: boolean | {
31231
31497
  enable: boolean;
31232
31498
  } | undefined;
31499
+ hooks?: ({
31500
+ type: "before_execute";
31501
+ id: string;
31502
+ handler: {
31503
+ type: "condition_check";
31504
+ condition: string;
31505
+ action: "block";
31506
+ };
31507
+ appliesTo: "all" | {
31508
+ toolkits: string[];
31509
+ };
31510
+ name?: string | undefined;
31511
+ } | {
31512
+ type: "after_execute";
31513
+ id: string;
31514
+ handler: {
31515
+ type: "condition_check";
31516
+ condition: string;
31517
+ action: "block";
31518
+ } | {
31519
+ type: "prompt_injection_check";
31520
+ action: "block";
31521
+ };
31522
+ appliesTo: "all" | {
31523
+ toolkits: string[];
31524
+ };
31525
+ name?: string | undefined;
31526
+ })[] | undefined;
31233
31527
  experimental?: {
31234
31528
  assistivePrompt?: {
31235
31529
  userTimezone?: string | undefined;
@@ -31316,6 +31610,34 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31316
31610
  proxyExecute?: boolean | {
31317
31611
  enable: boolean;
31318
31612
  } | undefined;
31613
+ hooks?: ({
31614
+ type: "before_execute";
31615
+ id: string;
31616
+ handler: {
31617
+ type: "condition_check";
31618
+ condition: string;
31619
+ action: "block";
31620
+ };
31621
+ appliesTo: "all" | {
31622
+ toolkits: string[];
31623
+ };
31624
+ name?: string | undefined;
31625
+ } | {
31626
+ type: "after_execute";
31627
+ id: string;
31628
+ handler: {
31629
+ type: "condition_check";
31630
+ condition: string;
31631
+ action: "block";
31632
+ } | {
31633
+ type: "prompt_injection_check";
31634
+ action: "block";
31635
+ };
31636
+ appliesTo: "all" | {
31637
+ toolkits: string[];
31638
+ };
31639
+ name?: string | undefined;
31640
+ })[] | undefined;
31319
31641
  experimental?: {
31320
31642
  assistivePrompt?: {
31321
31643
  userTimezone?: string | undefined;
@@ -31402,6 +31724,34 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31402
31724
  proxyExecute?: boolean | {
31403
31725
  enable: boolean;
31404
31726
  } | undefined;
31727
+ hooks?: ({
31728
+ type: "before_execute";
31729
+ id: string;
31730
+ handler: {
31731
+ type: "condition_check";
31732
+ condition: string;
31733
+ action: "block";
31734
+ };
31735
+ appliesTo: "all" | {
31736
+ toolkits: string[];
31737
+ };
31738
+ name?: string | undefined;
31739
+ } | {
31740
+ type: "after_execute";
31741
+ id: string;
31742
+ handler: {
31743
+ type: "condition_check";
31744
+ condition: string;
31745
+ action: "block";
31746
+ } | {
31747
+ type: "prompt_injection_check";
31748
+ action: "block";
31749
+ };
31750
+ appliesTo: "all" | {
31751
+ toolkits: string[];
31752
+ };
31753
+ name?: string | undefined;
31754
+ })[] | undefined;
31405
31755
  experimental?: {
31406
31756
  assistivePrompt?: {
31407
31757
  userTimezone?: string | undefined;
@@ -31488,6 +31838,34 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31488
31838
  proxyExecute?: boolean | {
31489
31839
  enable: boolean;
31490
31840
  } | undefined;
31841
+ hooks?: ({
31842
+ type: "before_execute";
31843
+ id: string;
31844
+ handler: {
31845
+ type: "condition_check";
31846
+ condition: string;
31847
+ action: "block";
31848
+ };
31849
+ appliesTo: "all" | {
31850
+ toolkits: string[];
31851
+ };
31852
+ name?: string | undefined;
31853
+ } | {
31854
+ type: "after_execute";
31855
+ id: string;
31856
+ handler: {
31857
+ type: "condition_check";
31858
+ condition: string;
31859
+ action: "block";
31860
+ } | {
31861
+ type: "prompt_injection_check";
31862
+ action: "block";
31863
+ };
31864
+ appliesTo: "all" | {
31865
+ toolkits: string[];
31866
+ };
31867
+ name?: string | undefined;
31868
+ })[] | undefined;
31491
31869
  experimental?: {
31492
31870
  assistivePrompt?: {
31493
31871
  userTimezone?: string | undefined;
@@ -31574,6 +31952,34 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31574
31952
  proxyExecute?: boolean | {
31575
31953
  enable: boolean;
31576
31954
  } | undefined;
31955
+ hooks?: ({
31956
+ type: "before_execute";
31957
+ id: string;
31958
+ handler: {
31959
+ type: "condition_check";
31960
+ condition: string;
31961
+ action: "block";
31962
+ };
31963
+ appliesTo: "all" | {
31964
+ toolkits: string[];
31965
+ };
31966
+ name?: string | undefined;
31967
+ } | {
31968
+ type: "after_execute";
31969
+ id: string;
31970
+ handler: {
31971
+ type: "condition_check";
31972
+ condition: string;
31973
+ action: "block";
31974
+ } | {
31975
+ type: "prompt_injection_check";
31976
+ action: "block";
31977
+ };
31978
+ appliesTo: "all" | {
31979
+ toolkits: string[];
31980
+ };
31981
+ name?: string | undefined;
31982
+ })[] | undefined;
31577
31983
  experimental?: {
31578
31984
  assistivePrompt?: {
31579
31985
  userTimezone?: string | undefined;
@@ -31590,7 +31996,7 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31590
31996
  * @param {SessionPreset} [sessionPreset] - Shortcut that exposes every tool allowed by the session filters directly in session.tools() and the MCP tool list. Disables search, multi-execute, manage-connections, and sandbox by default; explicit overrides for supported fields still win. Without this preset, ToolRouter uses the default configuration with meta tools enabled.
31591
31997
  * @param {ToolRouterToolkitsParamSchema | ToolRouterToolkitsDisabledConfigSchema | ToolRouterToolkitsEnabledConfigSchema} toolkits - The toolkits to use in the tool router session
31592
31998
  * @param {Record<string, ToolRouterToolsParam | ToolRouterConfigTools>} tools - The tools to configure per toolkit (key is toolkit slug)
31593
- * @param {Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>} tags - Global tags to filter tools by behavior
31999
+ * @param {Array<'readOnlyHint' | 'createHint' | 'updateHint' | 'destructiveHint'>} tags - Global tags to filter tools by the type of action they take
31594
32000
  * @param {Record<string, string>} authConfigs - The auth configs to use in the tool router session
31595
32001
  * @param {Record<string, string | string[]>} connectedAccounts - The connected accounts to use in the tool router session. A single string is coerced to a single-element array before being sent to the backend.
31596
32002
  * @param {ToolRouterInstant} [instant] - Experimental Instant usage policy. The project must allow Instant usage.
@@ -31609,10 +32015,11 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31609
32015
  * @param {boolean} [multiAccount.requireExplicitSelection] - When true, require explicit account selection when multiple accounts are connected
31610
32016
  * @param {boolean | object} [proxyExecute] - Proxy execute configuration for this session. A boolean is shorthand for `{ enable }`.
31611
32017
  * @param {boolean} proxyExecute.enable - `true` exposes the `COMPOSIO_PROXY_EXECUTE` meta tool. `false` also turns off the sandbox `proxy_execute()` helper.
32018
+ * @param {ToolRouterHook[]} [hooks] - Hooks that run on this session's tool calls. A `before_execute` hook can block a call before it runs; an `after_execute` hook can block its result before the agent sees it. Cannot be combined with `experimental.sessionConfigId`.
31612
32019
  * @param {object} [preload] - Tools to preload into session.tools() and the MCP tool list
31613
32020
  * @param {string[] | 'all'} [preload.tools] - Tool slugs to preload, or "all" to preload every app tool allowed by the session filters. "all" requires a positive filter such as toolkits, tools, or tags; the backend validates and caps the final tool set.
31614
32021
  * @param {object} [experimental] - Experimental features configuration. Not stable; may change or be removed.
31615
- * @param {string} [experimental.sessionConfigId] - ID of a saved Session config (`sc_…`) to apply at creation; see `composio.sessionConfigs`. Cannot be combined with `toolkits`, `tools`, `tags`, `experimental.customTools` or `experimental.customToolkits`. Per-session fields such as `authConfigs`, `connectedAccounts`, `manageConnections`, `sandbox`, `multiAccount` and `preload` stay allowed.
32022
+ * @param {string} [experimental.sessionConfigId] - ID of a saved Session config (`sc_…`) to apply at creation; see `composio.sessionConfigs`. Cannot be combined with `toolkits`, `tools`, `tags`, `hooks`, `experimental.customTools` or `experimental.customToolkits`. Per-session fields such as `authConfigs`, `connectedAccounts`, `manageConnections`, `sandbox`, `multiAccount` and `preload` stay allowed.
31616
32023
  */
31617
32024
  type ToolRouterCreateSessionConfig = InlineAccessCreateSessionConfig | SavedConfigCreateSessionConfig;
31618
32025
  type ParsedCreateSessionConfig = z.infer<typeof ToolRouterCreateSessionConfigSchema>;
@@ -31624,10 +32031,11 @@ type InlineAccessCreateSessionConfig = Omit<ParsedCreateSessionConfig, 'experime
31624
32031
  };
31625
32032
  };
31626
32033
  /** Create input that takes its access policy from a saved Session config. */
31627
- type SavedConfigCreateSessionConfig = Omit<ParsedCreateSessionConfig, 'toolkits' | 'tools' | 'tags' | 'experimental'> & {
32034
+ type SavedConfigCreateSessionConfig = Omit<ParsedCreateSessionConfig, 'toolkits' | 'tools' | 'tags' | 'hooks' | 'experimental'> & {
31628
32035
  toolkits?: never;
31629
32036
  tools?: never;
31630
32037
  tags?: never;
32038
+ hooks?: never;
31631
32039
  experimental: Omit<ParsedCreateSessionExperimental, 'sessionConfigId' | 'customTools' | 'customToolkits'> & {
31632
32040
  sessionConfigId: string;
31633
32041
  customTools?: never;
@@ -32237,33 +32645,139 @@ declare const ToolRouterSessionSearchResponseSchema: z.ZodObject<{
32237
32645
  };
32238
32646
  }>;
32239
32647
  type ToolRouterSessionSearchResponse = z.infer<typeof ToolRouterSessionSearchResponseSchema>;
32648
+ /**
32649
+ * What one session hook decided about a call. `unavailable` means the hook
32650
+ * could not be evaluated (for example it timed out); it does not block the
32651
+ * call.
32652
+ */
32653
+ declare const ToolRouterHookResultSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
32654
+ id: z.ZodString;
32655
+ status: z.ZodLiteral<"evaluated">;
32656
+ outcome: z.ZodEnum<["continue", "block"]>;
32657
+ }, "strip", z.ZodTypeAny, {
32658
+ status: "evaluated";
32659
+ id: string;
32660
+ outcome: "block" | "continue";
32661
+ }, {
32662
+ status: "evaluated";
32663
+ id: string;
32664
+ outcome: "block" | "continue";
32665
+ }>, z.ZodObject<{
32666
+ id: z.ZodString;
32667
+ status: z.ZodLiteral<"unavailable">;
32668
+ }, "strip", z.ZodTypeAny, {
32669
+ status: "unavailable";
32670
+ id: string;
32671
+ }, {
32672
+ status: "unavailable";
32673
+ id: string;
32674
+ }>]>;
32675
+ type ToolRouterHookResult = z.infer<typeof ToolRouterHookResultSchema>;
32676
+ /**
32677
+ * Why a session hook blocked a call. `request_blocked`: a `before_execute` hook
32678
+ * blocked it and the tool did not run. `response_blocked`: the tool ran and an
32679
+ * `after_execute` hook blocked its result.
32680
+ */
32681
+ declare const ToolRouterBlockReasonSchema: z.ZodObject<{
32682
+ type: z.ZodEnum<["request_blocked", "response_blocked"]>;
32683
+ hookId: z.ZodString;
32684
+ }, "strip", z.ZodTypeAny, {
32685
+ type: "request_blocked" | "response_blocked";
32686
+ hookId: string;
32687
+ }, {
32688
+ type: "request_blocked" | "response_blocked";
32689
+ hookId: string;
32690
+ }>;
32691
+ type ToolRouterBlockReason = z.infer<typeof ToolRouterBlockReasonSchema>;
32240
32692
  declare const ToolRouterSessionExecuteResponseSchema: z.ZodObject<{
32241
32693
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
32242
32694
  error: z.ZodNullable<z.ZodString>;
32243
32695
  logId: z.ZodString;
32244
32696
  /**
32245
- * Whether the tool ran and succeeded (`completed`) or ran and failed
32246
- * (`failed`). A failed execution can carry a `null` or empty `error`, so
32247
- * read this rather than `error` to tell the two apart.
32697
+ * Whether the tool ran and succeeded (`completed`), ran and failed
32698
+ * (`failed`), or was blocked by a session hook (`blocked`). A failed
32699
+ * execution can carry a `null` or empty `error`, so read this rather than
32700
+ * `error` to tell them apart. A blocked call has empty `data` and the
32701
+ * agent-facing message in `error`.
32248
32702
  */
32249
- resultType: z.ZodEnum<["completed", "failed"]>;
32703
+ resultType: z.ZodEnum<["completed", "failed", "blocked"]>;
32250
32704
  /** Actual Instant usage charge when the Session opts into returning it. */
32251
32705
  instantCharge: z.ZodOptional<z.ZodUnknown>;
32706
+ /** Set when `resultType` is `blocked`: which hook blocked the call, and at which stage. */
32707
+ blockReason: z.ZodOptional<z.ZodObject<{
32708
+ type: z.ZodEnum<["request_blocked", "response_blocked"]>;
32709
+ hookId: z.ZodString;
32710
+ }, "strip", z.ZodTypeAny, {
32711
+ type: "request_blocked" | "response_blocked";
32712
+ hookId: string;
32713
+ }, {
32714
+ type: "request_blocked" | "response_blocked";
32715
+ hookId: string;
32716
+ }>>;
32717
+ /** Every session hook that applied to this call. Absent when none applied. */
32718
+ hookResults: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
32719
+ id: z.ZodString;
32720
+ status: z.ZodLiteral<"evaluated">;
32721
+ outcome: z.ZodEnum<["continue", "block"]>;
32722
+ }, "strip", z.ZodTypeAny, {
32723
+ status: "evaluated";
32724
+ id: string;
32725
+ outcome: "block" | "continue";
32726
+ }, {
32727
+ status: "evaluated";
32728
+ id: string;
32729
+ outcome: "block" | "continue";
32730
+ }>, z.ZodObject<{
32731
+ id: z.ZodString;
32732
+ status: z.ZodLiteral<"unavailable">;
32733
+ }, "strip", z.ZodTypeAny, {
32734
+ status: "unavailable";
32735
+ id: string;
32736
+ }, {
32737
+ status: "unavailable";
32738
+ id: string;
32739
+ }>]>, "many">>;
32252
32740
  }, "strip", z.ZodTypeAny, {
32253
32741
  data: Record<string, unknown>;
32254
32742
  error: string | null;
32255
32743
  logId: string;
32256
- resultType: "completed" | "failed";
32744
+ resultType: "completed" | "failed" | "blocked";
32257
32745
  instantCharge?: unknown;
32746
+ blockReason?: {
32747
+ type: "request_blocked" | "response_blocked";
32748
+ hookId: string;
32749
+ } | undefined;
32750
+ hookResults?: ({
32751
+ status: "evaluated";
32752
+ id: string;
32753
+ outcome: "block" | "continue";
32754
+ } | {
32755
+ status: "unavailable";
32756
+ id: string;
32757
+ })[] | undefined;
32258
32758
  }, {
32259
32759
  data: Record<string, unknown>;
32260
32760
  error: string | null;
32261
32761
  logId: string;
32262
- resultType: "completed" | "failed";
32762
+ resultType: "completed" | "failed" | "blocked";
32263
32763
  instantCharge?: unknown;
32764
+ blockReason?: {
32765
+ type: "request_blocked" | "response_blocked";
32766
+ hookId: string;
32767
+ } | undefined;
32768
+ hookResults?: ({
32769
+ status: "evaluated";
32770
+ id: string;
32771
+ outcome: "block" | "continue";
32772
+ } | {
32773
+ status: "unavailable";
32774
+ id: string;
32775
+ })[] | undefined;
32264
32776
  }>;
32265
32777
  type ToolRouterSessionExecuteResponse = z.infer<typeof ToolRouterSessionExecuteResponseSchema>;
32266
- interface ToolRouterSessionProxyExecuteResponse {
32778
+ /** A proxied request that was sent. */
32779
+ interface ToolRouterSessionProxyExecuteCompleted {
32780
+ resultType: 'completed';
32267
32781
  /** The HTTP status code returned from the proxied API */
32268
32782
  status: number;
32269
32783
  /** The response data from the proxied API */
@@ -32277,7 +32791,24 @@ interface ToolRouterSessionProxyExecuteResponse {
32277
32791
  url: string;
32278
32792
  expiresAt?: string;
32279
32793
  };
32794
+ /** Every session hook that applied to this request. Absent when none applied. */
32795
+ hookResults?: ToolRouterHookResult[];
32280
32796
  }
32797
+ /** A proxied request that a session hook blocked. */
32798
+ interface ToolRouterSessionProxyExecuteBlocked {
32799
+ resultType: 'blocked';
32800
+ /** Which hook blocked the request, and at which stage. */
32801
+ blockReason: ToolRouterBlockReason;
32802
+ /** A message for the agent. It names the hook when the hook has a `name`. */
32803
+ message: string;
32804
+ /** Every session hook that applied to this request. */
32805
+ hookResults?: ToolRouterHookResult[];
32806
+ }
32807
+ /**
32808
+ * Result of `session.proxyExecute()`. Check `resultType` before reading
32809
+ * `status`: a request a session hook blocked has no HTTP response.
32810
+ */
32811
+ type ToolRouterSessionProxyExecuteResponse = ToolRouterSessionProxyExecuteCompleted | ToolRouterSessionProxyExecuteBlocked;
32281
32812
  /**
32282
32813
  * Experimental features on a tool router session.
32283
32814
  * Contains features that may be modified or removed in future versions.
@@ -32772,6 +33303,118 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
32772
33303
  }, {
32773
33304
  enable: boolean;
32774
33305
  }>]>>>>;
33306
+ hooks: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
33307
+ handler: z.ZodObject<{
33308
+ type: z.ZodLiteral<"condition_check">;
33309
+ condition: z.ZodString;
33310
+ action: z.ZodLiteral<"block">;
33311
+ }, "strict", z.ZodTypeAny, {
33312
+ type: "condition_check";
33313
+ condition: string;
33314
+ action: "block";
33315
+ }, {
33316
+ type: "condition_check";
33317
+ condition: string;
33318
+ action: "block";
33319
+ }>;
33320
+ id: z.ZodString;
33321
+ name: z.ZodOptional<z.ZodString>;
33322
+ appliesTo: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodObject<{
33323
+ toolkits: z.ZodArray<z.ZodString, "many">;
33324
+ }, "strict", z.ZodTypeAny, {
33325
+ toolkits: string[];
33326
+ }, {
33327
+ toolkits: string[];
33328
+ }>]>;
33329
+ type: z.ZodLiteral<"before_execute">;
33330
+ }, "strict", z.ZodTypeAny, {
33331
+ type: "before_execute";
33332
+ id: string;
33333
+ handler: {
33334
+ type: "condition_check";
33335
+ condition: string;
33336
+ action: "block";
33337
+ };
33338
+ appliesTo: "all" | {
33339
+ toolkits: string[];
33340
+ };
33341
+ name?: string | undefined;
33342
+ }, {
33343
+ type: "before_execute";
33344
+ id: string;
33345
+ handler: {
33346
+ type: "condition_check";
33347
+ condition: string;
33348
+ action: "block";
33349
+ };
33350
+ appliesTo: "all" | {
33351
+ toolkits: string[];
33352
+ };
33353
+ name?: string | undefined;
33354
+ }>, z.ZodObject<{
33355
+ handler: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
33356
+ type: z.ZodLiteral<"condition_check">;
33357
+ condition: z.ZodString;
33358
+ action: z.ZodLiteral<"block">;
33359
+ }, "strict", z.ZodTypeAny, {
33360
+ type: "condition_check";
33361
+ condition: string;
33362
+ action: "block";
33363
+ }, {
33364
+ type: "condition_check";
33365
+ condition: string;
33366
+ action: "block";
33367
+ }>, z.ZodObject<{
33368
+ type: z.ZodLiteral<"prompt_injection_check">;
33369
+ action: z.ZodLiteral<"block">;
33370
+ }, "strict", z.ZodTypeAny, {
33371
+ type: "prompt_injection_check";
33372
+ action: "block";
33373
+ }, {
33374
+ type: "prompt_injection_check";
33375
+ action: "block";
33376
+ }>]>;
33377
+ id: z.ZodString;
33378
+ name: z.ZodOptional<z.ZodString>;
33379
+ appliesTo: z.ZodUnion<[z.ZodLiteral<"all">, z.ZodObject<{
33380
+ toolkits: z.ZodArray<z.ZodString, "many">;
33381
+ }, "strict", z.ZodTypeAny, {
33382
+ toolkits: string[];
33383
+ }, {
33384
+ toolkits: string[];
33385
+ }>]>;
33386
+ type: z.ZodLiteral<"after_execute">;
33387
+ }, "strict", z.ZodTypeAny, {
33388
+ type: "after_execute";
33389
+ id: string;
33390
+ handler: {
33391
+ type: "condition_check";
33392
+ condition: string;
33393
+ action: "block";
33394
+ } | {
33395
+ type: "prompt_injection_check";
33396
+ action: "block";
33397
+ };
33398
+ appliesTo: "all" | {
33399
+ toolkits: string[];
33400
+ };
33401
+ name?: string | undefined;
33402
+ }, {
33403
+ type: "after_execute";
33404
+ id: string;
33405
+ handler: {
33406
+ type: "condition_check";
33407
+ condition: string;
33408
+ action: "block";
33409
+ } | {
33410
+ type: "prompt_injection_check";
33411
+ action: "block";
33412
+ };
33413
+ appliesTo: "all" | {
33414
+ toolkits: string[];
33415
+ };
33416
+ name?: string | undefined;
33417
+ }>]>, "many">>>>;
32775
33418
  preload: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
32776
33419
  tools: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodLiteral<"all">]>>;
32777
33420
  }, "strict", z.ZodTypeAny, {
@@ -32925,6 +33568,34 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
32925
33568
  proxyExecute?: boolean | {
32926
33569
  enable: boolean;
32927
33570
  } | null | undefined;
33571
+ hooks?: ({
33572
+ type: "before_execute";
33573
+ id: string;
33574
+ handler: {
33575
+ type: "condition_check";
33576
+ condition: string;
33577
+ action: "block";
33578
+ };
33579
+ appliesTo: "all" | {
33580
+ toolkits: string[];
33581
+ };
33582
+ name?: string | undefined;
33583
+ } | {
33584
+ type: "after_execute";
33585
+ id: string;
33586
+ handler: {
33587
+ type: "condition_check";
33588
+ condition: string;
33589
+ action: "block";
33590
+ } | {
33591
+ type: "prompt_injection_check";
33592
+ action: "block";
33593
+ };
33594
+ appliesTo: "all" | {
33595
+ toolkits: string[];
33596
+ };
33597
+ name?: string | undefined;
33598
+ })[] | null | undefined;
32928
33599
  experimental?: {
32929
33600
  sessionConfigId?: string | undefined;
32930
33601
  noElicitationSupportFallback?: "deny" | "allow" | undefined;
@@ -33021,6 +33692,34 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
33021
33692
  proxyExecute?: boolean | {
33022
33693
  enable: boolean;
33023
33694
  } | null | undefined;
33695
+ hooks?: ({
33696
+ type: "before_execute";
33697
+ id: string;
33698
+ handler: {
33699
+ type: "condition_check";
33700
+ condition: string;
33701
+ action: "block";
33702
+ };
33703
+ appliesTo: "all" | {
33704
+ toolkits: string[];
33705
+ };
33706
+ name?: string | undefined;
33707
+ } | {
33708
+ type: "after_execute";
33709
+ id: string;
33710
+ handler: {
33711
+ type: "condition_check";
33712
+ condition: string;
33713
+ action: "block";
33714
+ } | {
33715
+ type: "prompt_injection_check";
33716
+ action: "block";
33717
+ };
33718
+ appliesTo: "all" | {
33719
+ toolkits: string[];
33720
+ };
33721
+ name?: string | undefined;
33722
+ })[] | null | undefined;
33024
33723
  experimental?: {
33025
33724
  sessionConfigId?: string | undefined;
33026
33725
  noElicitationSupportFallback?: "deny" | "allow" | undefined;
@@ -33117,6 +33816,34 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
33117
33816
  proxyExecute?: boolean | {
33118
33817
  enable: boolean;
33119
33818
  } | null | undefined;
33819
+ hooks?: ({
33820
+ type: "before_execute";
33821
+ id: string;
33822
+ handler: {
33823
+ type: "condition_check";
33824
+ condition: string;
33825
+ action: "block";
33826
+ };
33827
+ appliesTo: "all" | {
33828
+ toolkits: string[];
33829
+ };
33830
+ name?: string | undefined;
33831
+ } | {
33832
+ type: "after_execute";
33833
+ id: string;
33834
+ handler: {
33835
+ type: "condition_check";
33836
+ condition: string;
33837
+ action: "block";
33838
+ } | {
33839
+ type: "prompt_injection_check";
33840
+ action: "block";
33841
+ };
33842
+ appliesTo: "all" | {
33843
+ toolkits: string[];
33844
+ };
33845
+ name?: string | undefined;
33846
+ })[] | null | undefined;
33120
33847
  experimental?: {
33121
33848
  sessionConfigId?: string | undefined;
33122
33849
  noElicitationSupportFallback?: "deny" | "allow" | undefined;
@@ -33213,6 +33940,34 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
33213
33940
  proxyExecute?: boolean | {
33214
33941
  enable: boolean;
33215
33942
  } | null | undefined;
33943
+ hooks?: ({
33944
+ type: "before_execute";
33945
+ id: string;
33946
+ handler: {
33947
+ type: "condition_check";
33948
+ condition: string;
33949
+ action: "block";
33950
+ };
33951
+ appliesTo: "all" | {
33952
+ toolkits: string[];
33953
+ };
33954
+ name?: string | undefined;
33955
+ } | {
33956
+ type: "after_execute";
33957
+ id: string;
33958
+ handler: {
33959
+ type: "condition_check";
33960
+ condition: string;
33961
+ action: "block";
33962
+ } | {
33963
+ type: "prompt_injection_check";
33964
+ action: "block";
33965
+ };
33966
+ appliesTo: "all" | {
33967
+ toolkits: string[];
33968
+ };
33969
+ name?: string | undefined;
33970
+ })[] | null | undefined;
33216
33971
  experimental?: {
33217
33972
  sessionConfigId?: string | undefined;
33218
33973
  noElicitationSupportFallback?: "deny" | "allow" | undefined;
@@ -33233,8 +33988,8 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
33233
33988
  }>;
33234
33989
  /**
33235
33990
  * Options for `session.update()`. `experimental.sessionConfigId` applies a
33236
- * saved Session config and cannot be combined with `toolkits`, `tools` or
33237
- * `tags` (including `null`).
33991
+ * saved Session config and cannot be combined with `toolkits`, `tools`,
33992
+ * `tags` or `hooks` (including `null`).
33238
33993
  */
33239
33994
  type ToolRouterUpdateSessionConfig = InlineAccessUpdateSessionConfig | SavedConfigUpdateSessionConfig;
33240
33995
  type ParsedUpdateSessionConfig = z.infer<typeof ToolRouterUpdateSessionConfigSchema>;
@@ -33246,10 +34001,11 @@ type InlineAccessUpdateSessionConfig = Omit<ParsedUpdateSessionConfig, 'experime
33246
34001
  }) | null;
33247
34002
  };
33248
34003
  /** Update input that applies a saved Session config. */
33249
- type SavedConfigUpdateSessionConfig = Omit<ParsedUpdateSessionConfig, 'toolkits' | 'tools' | 'tags' | 'experimental'> & {
34004
+ type SavedConfigUpdateSessionConfig = Omit<ParsedUpdateSessionConfig, 'toolkits' | 'tools' | 'tags' | 'hooks' | 'experimental'> & {
33250
34005
  toolkits?: never;
33251
34006
  tools?: never;
33252
34007
  tags?: never;
34008
+ hooks?: never;
33253
34009
  experimental: Omit<ParsedUpdateSessionExperimental, 'sessionConfigId'> & {
33254
34010
  sessionConfigId: string;
33255
34011
  };
@@ -33640,4 +34396,4 @@ type CustomToolResponse = SessionCreateResponse.Experimental.CustomTool;
33640
34396
  /** Custom toolkit as returned in the session create response (has prefixed slugs + original_slugs). */
33641
34397
  type CustomToolkitResponse = SessionCreateResponse.Experimental.CustomToolkit;
33642
34398
  //#endregion
33643
- export { ToolRouterSessionConfig as $, Oauth2InactiveConnectionData as $i, CreateConnectedAccountOptions as $n, McpDeleteResponseSchema as $r, FileDeleteResponseSchema as $t, SessionProxyExecuteParams as A, ToolExecuteParams as Aa, CustomOauth2ConnectionDataSchema as Ai, ConnectedAccountListParamsSchema as An, MCPAuthOptionsSchema as Ar, ToolRouterTagsEnableDisableSchema as At, ToolRouterCreateSessionConfigSchema as B, ToolProxyParamsSchema as Ba, Oauth1InactiveConnectionDataSchema as Bi, ConnectedAccountRevokedToken as Bn, MCPServerCreateResponse as Br, ToolRouterToolsParamSchema as Bt, MCPServerType as C, CustomAuthParamsSchema as Ca, ConnectionStatusEnum as Ci, ConnectedAccountCompleteAuthResponse as Cn, CustomCreateResponseValidated as Cr, ToolRouterSessionProxyExecuteResponse as Ct, Session as D, Tool as Da, CustomOauth1ConnectionData as Di, ConnectedAccountExperimentalResponseSchema as Dn, GenerateURLResponseSchema as Dr, ToolRouterSessionUpdateFn as Dt, SandboxSizeSchema as E, SchemaModifierOptions as Ea, CustomConnectionDataSchema as Ei, ConnectedAccountExperimentalResponse as En, GenerateURLResponse$1 as Er, ToolRouterSessionSearchResponseSchema as Et, ToolRouterConfigTags as F, ToolListParams as Fa, Oauth1ExpiredConnectionData as Fi, ConnectedAccountRefreshOptionsSchema as Fn, MCPGetServerParamsSchema as Fr, ToolRouterToolkitsOptions as Ft, ToolRouterMCPServerConfigSchema as G, ToolkitLatestVersionSchema as Ga, Oauth2ActiveConnectionData as Gi, ConnectedAccountStatuses as Gn, MCPServerUpdateParams as Gr, ToolRouterUpdateSessionConfig as Gt, ToolRouterInstant as H, ToolSchema as Ha, Oauth1InitiatedConnectionDataSchema as Hi, ConnectedAccountStatus as Hn, MCPServerListResponse as Hr, ToolRouterUpdateExperimentalSchema as Ht, ToolRouterConfigTagsSchema as I, ToolListParamsSchema as Ia, Oauth1ExpiredConnectionDataSchema as Ii, ConnectedAccountRetrieveResponse as In, MCPInstanceParams as Ir, ToolRouterToolkitsOptionsSchema as It, ToolRouterProxyExecuteConfig as J, ToolkitVersionParam as Ja, Oauth2ConnectionDataSchema as Ji, ConnectedAccountTypes as Jn, MCPSingleAppServerSchema as Jr, ToolkitConnectionStateSchema as Jt, ToolRouterManageConnectionsConfigSchema as K, ToolkitSchema as Ka, Oauth2ActiveConnectionDataSchema as Ki, ConnectedAccountType as Kn, MCPServerUpdateParamsSchema as Kr, ToolRouterUpdateSessionConfigSchema as Kt, ToolRouterConfigTools as L, ToolListResponse as La, Oauth1FailedConnectionData as Li, ConnectedAccountRetrieveResponseSchema as Ln, MCPMultiAppServer as Lr, ToolRouterToolkitsParamSchema as Lt, SessionWithoutMcp as M, ToolExecuteResponse as Ma, Oauth1ActiveConnectionDataSchema as Mi, ConnectedAccountListResponseItem as Mn, MCPGenerateURLParams as Mr, ToolRouterToolkitsDisabledConfigSchema as Mt, ToolRouterAuthorizeFn as N, ToolExecuteResponseSchema as Na, Oauth1ConnectionData as Ni, ConnectedAccountListResponseSchema as Nn, MCPGenerateURLParamsSchema as Nr, ToolRouterToolkitsEnabledConfigSchema as Nt, SessionExperimental as O, ToolExecuteMetaParams as Oa, CustomOauth1ConnectionDataSchema as Oi, ConnectedAccountExperimentalSchema as On, GenerateURLResponseValidated as Or, ToolRouterSessionWarning as Ot, ToolRouterConfigManageConnectionsSchema as P, ToolList as Pa, Oauth1ConnectionDataSchema as Pi, ConnectedAccountRefreshOptions as Pn, MCPGetServerParams as Pr, ToolRouterToolkitsFn as Pt, ToolRouterSandboxConfigSchema as Q, ToolkitVersionsSchema as Qa, Oauth2FailedConnectionDataSchema as Qi, CreateConnectedAccountLinkResponseSchema as Qn, McpDeleteResponse as Qr, FileDeleteResponse as Qt, ToolRouterConfigToolsSchema as R, ToolListResponseSchema as Ra, Oauth1FailedConnectionDataSchema as Ri, ConnectedAccountRevokeResponse as Rn, MCPMultiAppServerSchema as Rr, ToolRouterToolsFn as Rt, SessionContext as S, CustomAuthParams as Sa, ConnectionDataSchema as Si, ConnectedAccountCompleteAuthParamsSchema as Sn, CustomCreateResponseSchema as Sr, ToolRouterSessionProxyExecuteFn as St, SandboxSize as T, JSONSchemaPropertySchema as Ta, CustomConnectionData as Ti, ConnectedAccountExperimental as Tn, GenerateURLParamsSchema as Tr, ToolRouterSessionSearchResponse as Tt, ToolRouterInstantSchema as U, Toolkit as Ua, Oauth1InitiatingConnectionData as Ui, ConnectedAccountStatusEnum as Un, MCPServerListResponseSchema as Ur, ToolRouterUpdateManageConnectionsConfig as Ut, ToolRouterInputResponse as V, ToolRetrievalOptions as Va, Oauth1InitiatedConnectionData as Vi, ConnectedAccountRevokedTokenSchema as Vn, MCPServerCreateResponseSchema as Vr, ToolRouterUpdateExperimentalConfig as Vt, ToolRouterMCPServerConfig as W, ToolkitLatestVersion as Wa, Oauth1InitiatingConnectionDataSchema as Wi, ConnectedAccountStatusSchema as Wn, MCPServerSchema as Wr, ToolRouterUpdateManageConnectionsSchema as Wt, ToolRouterProxyExecuteSchema as X, ToolkitVersionSchema as Xa, Oauth2ExpiredConnectionDataSchema as Xi, CreateConnectedAccountLinkOptionsSchema as Xn, MCPToolkitConfigSchema as Xr, ToolkitConnectionsDetailsSchema as Xt, ToolRouterProxyExecuteConfigSchema as Y, ToolkitVersionParamSchema as Ya, Oauth2ExpiredConnectionData as Yi, CreateConnectedAccountLinkOptions as Yn, MCPToolkitConfig as Yr, ToolkitConnectionsDetails as Yt, ToolRouterSandboxConfig as Z, ToolkitVersions as Za, Oauth2FailedConnectionData as Zi, CreateConnectedAccountLinkResponse as Zn, MCPToolkitConfigsArraySchema as Zr, RemoteFile as Zt, CustomToolsMapEntry as _, afterExecuteMetaModifier as _a, ToolCallExecutionTarget as _i, ConnectedAccountAclConfigResponseSchema as _n, ComposioMcpListResponseSchema as _r, ToolRouterSessionListConfigHistoryOptionsSchema as _t, CreateCustomToolkitParams as a, Oauth2RevokedConnectionData as aa, McpServerGetResponse as ai, ToolRouterSessionFilesMountDeleteOptionsSchema as an, DefaultCreateConnectedAccountParamsSchema as ar, ToolRouterSessionEnsureConnectedFn as at, RegisteredCustomTool as b, beforeExecuteModifier as ba, BillcomAuthConnectionDataSchema as bi, ConnectedAccountAuthConfigSchema as bn, ConnectionStatus as br, ToolRouterSessionMetadata as bt, CustomToolExecuteFn as c, AgenticToolOptions as ca, McpUpdateResponse as ci, ToolRouterSessionFilesMountListOptions as cn, UpdateConnectedAccountParams as cr, ToolRouterSessionEnsureConnectedResult as ct, CustomToolWireDefinition as d, MetaToolArguments as da, McpUrlResponseCamelCase as di, ToolRouterSessionFilesMountUploadOptionsSchema as dn, BaseComposioProvider as dr, ToolRouterSessionExecuteMetaOptions as dt, Oauth2InactiveConnectionDataSchema as ea, McpListResponse as ei, FileListResponse as en, CreateConnectedAccountOptionsSchema as er, ToolRouterSessionConfigHistoryConfig as et, CustomToolkit as f, ProviderOptions as fa, McpUserConnectionStatus as fi, ComposioRequestOptions as fn, BaseNonAgenticProvider as fr, ToolRouterSessionExecuteOptions as ft, CustomToolsMap as g, TransformToolSchemaModifier as ga, Provider as gi, ConnectedAccountAclConfigResponse as gn, ComposioMcpDeleteResponseSchema as gr, ToolRouterSessionListConfigHistoryOptions as gt, CustomToolkitWireDefinition as h, ToolOptions as ha, GlobalExecuteToolFn as hi, ConnectedAccountAclConfig as hn, ComposioGenerateURLResponseSchema as hr, ToolRouterSessionListConfigHistoryFn as ht, CreateCustomToolkitBaseSchema as i, Oauth2InitiatingConnectionDataSchema as ia, McpServerCreateResponse as ii, ToolRouterSessionFilesMountDeleteOptions as in, CreateConnectedAccountResponseSchema as ir, ToolRouterSessionDeleteResponseSchema as it, SessionProxyExecuteParamsSchema as j, ToolExecuteParamsSchema as ja, Oauth1ActiveConnectionData as ji, ConnectedAccountListResponse as jn, MCPCreateMethodResponse as jr, ToolRouterTagsParamSchema as jt, SessionPreset as k, ToolExecuteMetaParamsSchema as ka, CustomOauth2ConnectionData as ki, ConnectedAccountListParams as kn, MCPAuthOptions as kr, ToolRouterSessionWorkbenchConfig as kt, CustomToolResponse as l, BeforeFileUploadSource as la, McpUpdateResponseSchema as li, ToolRouterSessionFilesMountListOptionsSchema as ln, UpdateConnectedAccountParamsSchema as lr, ToolRouterSessionExecuteFn as lt, CustomToolkitResponse as m, SessionMetaToolOptions as ma, ExecuteToolFnOptions as mi, ConnectionRequestState as mn, ComposioGenerateURLParamsSchema as mr, ToolRouterSessionExecuteResponseSchema as mt, CreateCustomToolBaseSchema as n, Oauth2InitiatedConnectionDataSchema as na, McpRetrieveResponse as ni, RemoteFileData as nn, CreateConnectedAccountParamsSchema as nr, ToolRouterSessionDeleteFn as nt, CustomTool as o, Oauth2RevokedConnectionDataSchema as oa, McpServerUrlInfo as oi, ToolRouterSessionFilesMountDownloadOptions as on, UpdateConnectedAccountAclParams as or, ToolRouterSessionEnsureConnectedOptions as ot, CustomToolkitDefinition as p, SessionExecuteMetaModifiers as pa, ExecuteToolFn as pi, ConnectionRequest as pn, ComposioCustomCreateResponseSchema as pr, ToolRouterSessionExecuteResponse as pt, ToolRouterProxyExecute as q, ToolkitVersion as qa, Oauth2ConnectionData as qi, ConnectedAccountTypeSchema as qn, MCPSingleAppServer as qr, ToolkitConnectionState as qt, CreateCustomToolParams as r, Oauth2InitiatingConnectionData as ra, McpRetrieveResponseSchema as ri, RemoteFileDataSchema as rn, CreateConnectedAccountResponse as rr, ToolRouterSessionDeleteResponse as rt, CustomToolDefinition as s, RedirectableAuthSchemeSchema as sa, McpToolkitConnectionStatus as si, ToolRouterSessionFilesMountDownloadOptionsSchema as sn, UpdateConnectedAccountAclParamsSchema as sr, ToolRouterSessionEnsureConnectedOptionsSchema as st, AnyZodSchema as t, Oauth2InitiatedConnectionData as ta, McpListResponseSchema as ti, FileListResponseSchema as tn, CreateConnectedAccountParams as tr, ToolRouterSessionConfigHistoryItem as tt, CustomToolSlugSchema as u, ExecuteToolModifiers as ua, McpUrlResponse as ui, ToolRouterSessionFilesMountUploadOptions as un, BaseAgenticProvider as ur, ToolRouterSessionExecuteMetaFn as ut, InferZodSchema as v, afterExecuteModifier as va, ToolCallSession as vi, ConnectedAccountAclConfigSchema as vn, ComposioMcpRetrieveResponseSchema as vr, ToolRouterSessionListConfigHistoryResponse as vt, MCPServerTypeSchema as w, JSONSchemaProperty as wa, ConnectionStatuses as wi, ConnectedAccountCompleteAuthResponseSchema as wn, GenerateURLParams as wr, ToolRouterSessionSearchFn as wt, RegisteredCustomToolkit as x, beforeFileUploadModifier as xa, ConnectionData as xi, ConnectedAccountCompleteAuthParams as xn, CustomCreateResponse$1 as xr, ToolRouterSessionPreloadConfig as xt, InlineCustomToolsWirePayload as y, beforeExecuteMetaModifier as ya, BaseConnectionFields as yi, ConnectedAccountAuthConfig as yn, ComposioMcpUpdateResponseSchema as yr, ToolRouterSessionMetaToolSlug as yt, ToolRouterCreateSessionConfig as z, ToolProxyParams as za, Oauth1InactiveConnectionData as zi, ConnectedAccountRevokeResponseSchema as zn, MCPServer as zr, ToolRouterToolsParam as zt };
34399
+ export { ToolRouterInputResponse as $, ToolProxyParams as $a, Oauth1InactiveConnectionData as $i, ConnectedAccountRevokeResponseSchema as $n, MCPServer as $r, ToolRouterToolsParam as $t, SessionProxyExecuteParams as A, TransformToolSchemaModifier as Aa, Provider as Ai, ConnectedAccountAclConfigResponse as An, ComposioMcpDeleteResponseSchema as Ar, ToolRouterSessionListConfigHistoryResponse as At, ToolRouterConfigToolsSchema as B, SchemaModifierOptions as Ba, CustomConnectionDataSchema as Bi, ConnectedAccountExperimentalResponse as Bn, GenerateURLResponse$1 as Br, ToolRouterSessionSearchResponseSchema as Bt, MCPServerType as C, BeforeFileUploadSource as Ca, McpUpdateResponseSchema as Ci, ToolRouterSessionFilesMountListOptionsSchema as Cn, UpdateConnectedAccountParamsSchema as Cr, ToolRouterSessionExecuteMetaOptions as Ct, Session as D, SessionExecuteMetaModifiers as Da, ExecuteToolFn as Di, ConnectionRequest as Dn, ComposioCustomCreateResponseSchema as Dr, ToolRouterSessionListConfigHistoryFn as Dt, SandboxSizeSchema as E, ProviderOptions as Ea, McpUserConnectionStatus as Ei, ComposioRequestOptions as En, BaseNonAgenticProvider as Er, ToolRouterSessionExecuteResponseSchema as Et, ToolRouterBlockReasonSchema as F, beforeFileUploadModifier as Fa, ConnectionData as Fi, ConnectedAccountCompleteAuthParams as Fn, CustomCreateResponse$1 as Fr, ToolRouterSessionProxyExecuteCompleted as Ft, ToolRouterHookAppliesToSchema as G, ToolExecuteParamsSchema as Ga, Oauth1ActiveConnectionData as Gi, ConnectedAccountListResponse as Gn, MCPCreateMethodResponse as Gr, ToolRouterTagsParamSchema as Gt, ToolRouterCreateSessionConfigSchema as H, ToolExecuteMetaParams as Ha, CustomOauth1ConnectionDataSchema as Hi, ConnectedAccountExperimentalSchema as Hn, GenerateURLResponseValidated as Hr, ToolRouterSessionWarning as Ht, ToolRouterConfigManageConnectionsSchema as I, CustomAuthParams as Ia, ConnectionDataSchema as Ii, ConnectedAccountCompleteAuthParamsSchema as In, CustomCreateResponseSchema as Ir, ToolRouterSessionProxyExecuteFn as It, ToolRouterHookPromptInjectionCheckHandler as J, ToolList as Ja, Oauth1ConnectionDataSchema as Ji, ConnectedAccountRefreshOptions as Jn, MCPGetServerParams as Jr, ToolRouterToolkitsFn as Jt, ToolRouterHookConditionCheckHandler as K, ToolExecuteResponse as Ka, Oauth1ActiveConnectionDataSchema as Ki, ConnectedAccountListResponseItem as Kn, MCPGenerateURLParams as Kr, ToolRouterToolkitsDisabledConfigSchema as Kt, ToolRouterConfigTags as L, CustomAuthParamsSchema as La, ConnectionStatusEnum as Li, ConnectedAccountCompleteAuthResponse as Ln, CustomCreateResponseValidated as Lr, ToolRouterSessionProxyExecuteResponse as Lt, SessionWithoutMcp as M, afterExecuteModifier as Ma, ToolCallSession as Mi, ConnectedAccountAclConfigSchema as Mn, ComposioMcpRetrieveResponseSchema as Mr, ToolRouterSessionMetadata as Mt, ToolRouterAuthorizeFn as N, beforeExecuteMetaModifier as Na, BaseConnectionFields as Ni, ConnectedAccountAuthConfig as Nn, ComposioMcpUpdateResponseSchema as Nr, ToolRouterSessionPreloadConfig as Nt, SessionExperimental as O, SessionMetaToolOptions as Oa, ExecuteToolFnOptions as Oi, ConnectionRequestState as On, ComposioGenerateURLParamsSchema as Or, ToolRouterSessionListConfigHistoryOptions as Ot, ToolRouterBlockReason as P, beforeExecuteModifier as Pa, BillcomAuthConnectionDataSchema as Pi, ConnectedAccountAuthConfigSchema as Pn, ConnectionStatus as Pr, ToolRouterSessionProxyExecuteBlocked as Pt, ToolRouterHookSchema as Q, ToolListResponseSchema as Qa, Oauth1FailedConnectionDataSchema as Qi, ConnectedAccountRevokeResponse as Qn, MCPMultiAppServerSchema as Qr, ToolRouterToolsFn as Qt, ToolRouterConfigTagsSchema as R, JSONSchemaProperty as Ra, ConnectionStatuses as Ri, ConnectedAccountCompleteAuthResponseSchema as Rn, GenerateURLParams as Rr, ToolRouterSessionSearchFn as Rt, SessionContext as S, AgenticToolOptions as Sa, McpUpdateResponse as Si, ToolRouterSessionFilesMountListOptions as Sn, UpdateConnectedAccountParams as Sr, ToolRouterSessionExecuteMetaFn as St, SandboxSize as T, MetaToolArguments as Ta, McpUrlResponseCamelCase as Ti, ToolRouterSessionFilesMountUploadOptionsSchema as Tn, BaseComposioProvider as Tr, ToolRouterSessionExecuteResponse as Tt, ToolRouterHook as U, ToolExecuteMetaParamsSchema as Ua, CustomOauth2ConnectionData as Ui, ConnectedAccountListParams as Un, MCPAuthOptions as Ur, ToolRouterSessionWorkbenchConfig as Ut, ToolRouterCreateSessionConfig as V, Tool as Va, CustomOauth1ConnectionData as Vi, ConnectedAccountExperimentalResponseSchema as Vn, GenerateURLResponseSchema as Vr, ToolRouterSessionUpdateFn as Vt, ToolRouterHookAppliesTo as W, ToolExecuteParams as Wa, CustomOauth2ConnectionDataSchema as Wi, ConnectedAccountListParamsSchema as Wn, MCPAuthOptionsSchema as Wr, ToolRouterTagsEnableDisableSchema as Wt, ToolRouterHookResult as X, ToolListParamsSchema as Xa, Oauth1ExpiredConnectionDataSchema as Xi, ConnectedAccountRetrieveResponse as Xn, MCPInstanceParams as Xr, ToolRouterToolkitsOptionsSchema as Xt, ToolRouterHookPromptInjectionCheckHandlerSchema as Y, ToolListParams as Ya, Oauth1ExpiredConnectionData as Yi, ConnectedAccountRefreshOptionsSchema as Yn, MCPGetServerParamsSchema as Yr, ToolRouterToolkitsOptions as Yt, ToolRouterHookResultSchema as Z, ToolListResponse as Za, Oauth1FailedConnectionData as Zi, ConnectedAccountRetrieveResponseSchema as Zn, MCPMultiAppServer as Zr, ToolRouterToolkitsParamSchema as Zt, CustomToolsMapEntry as _, Oauth2InitiatingConnectionData as _a, McpRetrieveResponseSchema as _i, RemoteFileDataSchema as _n, CreateConnectedAccountResponse as _r, ToolRouterSessionEnsureConnectedFn as _t, CreateCustomToolkitParams as a, Oauth2ActiveConnectionData as aa, MCPServerUpdateParams as ai, ToolRouterUpdateSessionConfig as an, ToolkitLatestVersionSchema as ao, ConnectedAccountStatuses as ar, ToolRouterProxyExecute as at, RegisteredCustomTool as b, Oauth2RevokedConnectionDataSchema as ba, McpServerUrlInfo as bi, ToolRouterSessionFilesMountDownloadOptions as bn, UpdateConnectedAccountAclParams as br, ToolRouterSessionEnsureConnectedResult as bt, CustomToolExecuteFn as c, Oauth2ConnectionDataSchema as ca, MCPSingleAppServerSchema as ci, ToolkitConnectionStateSchema as cn, ToolkitVersionParam as co, ConnectedAccountTypes as cr, ToolRouterProxyExecuteSchema as ct, CustomToolWireDefinition as d, Oauth2FailedConnectionData as da, MCPToolkitConfigsArraySchema as di, RemoteFile as dn, ToolkitVersions as do, CreateConnectedAccountLinkResponse as dr, ToolRouterSessionConfig as dt, Oauth1InactiveConnectionDataSchema as ea, MCPServerCreateResponse as ei, ToolRouterToolsParamSchema as en, ToolProxyParamsSchema as eo, ConnectedAccountRevokedToken as er, ToolRouterInstant as et, CustomToolkit as f, Oauth2FailedConnectionDataSchema as fa, McpDeleteResponse as fi, FileDeleteResponse as fn, ToolkitVersionsSchema as fo, CreateConnectedAccountLinkResponseSchema as fr, ToolRouterSessionConfigHistoryConfig as ft, CustomToolsMap as g, Oauth2InitiatedConnectionDataSchema as ga, McpRetrieveResponse as gi, RemoteFileData as gn, CreateConnectedAccountParamsSchema as gr, ToolRouterSessionDeleteResponseSchema as gt, CustomToolkitWireDefinition as h, Oauth2InitiatedConnectionData as ha, McpListResponseSchema as hi, FileListResponseSchema as hn, CreateConnectedAccountParams as hr, ToolRouterSessionDeleteResponse as ht, CreateCustomToolkitBaseSchema as i, Oauth1InitiatingConnectionDataSchema as ia, MCPServerSchema as ii, ToolRouterUpdateManageConnectionsSchema as in, ToolkitLatestVersion as io, ConnectedAccountStatusSchema as ir, ToolRouterManageConnectionsConfigSchema as it, SessionProxyExecuteParamsSchema as j, afterExecuteMetaModifier as ja, ToolCallExecutionTarget as ji, ConnectedAccountAclConfigResponseSchema as jn, ComposioMcpListResponseSchema as jr, ToolRouterSessionMetaToolSlug as jt, SessionPreset as k, ToolOptions as ka, GlobalExecuteToolFn as ki, ConnectedAccountAclConfig as kn, ComposioGenerateURLResponseSchema as kr, ToolRouterSessionListConfigHistoryOptionsSchema as kt, CustomToolResponse as l, Oauth2ExpiredConnectionData as la, MCPToolkitConfig as li, ToolkitConnectionsDetails as ln, ToolkitVersionParamSchema as lo, CreateConnectedAccountLinkOptions as lr, ToolRouterSandboxConfig as lt, CustomToolkitResponse as m, Oauth2InactiveConnectionDataSchema as ma, McpListResponse as mi, FileListResponse as mn, CreateConnectedAccountOptionsSchema as mr, ToolRouterSessionDeleteFn as mt, CreateCustomToolBaseSchema as n, Oauth1InitiatedConnectionDataSchema as na, MCPServerListResponse as ni, ToolRouterUpdateExperimentalSchema as nn, ToolSchema as no, ConnectedAccountStatus as nr, ToolRouterMCPServerConfig as nt, CustomTool as o, Oauth2ActiveConnectionDataSchema as oa, MCPServerUpdateParamsSchema as oi, ToolRouterUpdateSessionConfigSchema as on, ToolkitSchema as oo, ConnectedAccountType as or, ToolRouterProxyExecuteConfig as ot, CustomToolkitDefinition as p, Oauth2InactiveConnectionData as pa, McpDeleteResponseSchema as pi, FileDeleteResponseSchema as pn, CreateConnectedAccountOptions as pr, ToolRouterSessionConfigHistoryItem as pt, ToolRouterHookConditionCheckHandlerSchema as q, ToolExecuteResponseSchema as qa, Oauth1ConnectionData as qi, ConnectedAccountListResponseSchema as qn, MCPGenerateURLParamsSchema as qr, ToolRouterToolkitsEnabledConfigSchema as qt, CreateCustomToolParams as r, Oauth1InitiatingConnectionData as ra, MCPServerListResponseSchema as ri, ToolRouterUpdateManageConnectionsConfig as rn, Toolkit as ro, ConnectedAccountStatusEnum as rr, ToolRouterMCPServerConfigSchema as rt, CustomToolDefinition as s, Oauth2ConnectionData as sa, MCPSingleAppServer as si, ToolkitConnectionState as sn, ToolkitVersion as so, ConnectedAccountTypeSchema as sr, ToolRouterProxyExecuteConfigSchema as st, AnyZodSchema as t, Oauth1InitiatedConnectionData as ta, MCPServerCreateResponseSchema as ti, ToolRouterUpdateExperimentalConfig as tn, ToolRetrievalOptions as to, ConnectedAccountRevokedTokenSchema as tr, ToolRouterInstantSchema as tt, CustomToolSlugSchema as u, Oauth2ExpiredConnectionDataSchema as ua, MCPToolkitConfigSchema as ui, ToolkitConnectionsDetailsSchema as un, ToolkitVersionSchema as uo, CreateConnectedAccountLinkOptionsSchema as ur, ToolRouterSandboxConfigSchema as ut, InferZodSchema as v, Oauth2InitiatingConnectionDataSchema as va, McpServerCreateResponse as vi, ToolRouterSessionFilesMountDeleteOptions as vn, CreateConnectedAccountResponseSchema as vr, ToolRouterSessionEnsureConnectedOptions as vt, MCPServerTypeSchema as w, ExecuteToolModifiers as wa, McpUrlResponse as wi, ToolRouterSessionFilesMountUploadOptions as wn, BaseAgenticProvider as wr, ToolRouterSessionExecuteOptions as wt, RegisteredCustomToolkit as x, RedirectableAuthSchemeSchema as xa, McpToolkitConnectionStatus as xi, ToolRouterSessionFilesMountDownloadOptionsSchema as xn, UpdateConnectedAccountAclParamsSchema as xr, ToolRouterSessionExecuteFn as xt, InlineCustomToolsWirePayload as y, Oauth2RevokedConnectionData as ya, McpServerGetResponse as yi, ToolRouterSessionFilesMountDeleteOptionsSchema as yn, DefaultCreateConnectedAccountParamsSchema as yr, ToolRouterSessionEnsureConnectedOptionsSchema as yt, ToolRouterConfigTools as z, JSONSchemaPropertySchema as za, CustomConnectionData as zi, ConnectedAccountExperimental as zn, GenerateURLParamsSchema as zr, ToolRouterSessionSearchResponse as zt };