@composio/core 0.19.0 → 0.21.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 (97) hide show
  1. package/dist/{CustomTool-BMlZfJVz.mjs → CustomTool-B-_VjWpy.mjs} +1 -1
  2. package/dist/{CustomTool-CB5vm1Jc.d.mts → CustomTool-BHOYxLZX.d.mts} +1 -1
  3. package/dist/{FileModifierErrors-BqFmpRsm.mjs → FileModifierErrors-CdGSABoq.mjs} +1 -1
  4. package/dist/{SsrfErrors-C91YhASE.mjs → SsrfErrors-DiQldIdC.mjs} +18 -7
  5. package/dist/{Telemetry-HlftxMx6.mjs → Telemetry-JRJJYS4I.mjs} +2 -2
  6. package/dist/{cancellation-CXpfmiVo.mjs → cancellation-DV8CIi52.mjs} +2 -2
  7. package/dist/{composio-DLGaeN70.d.mts → composio-BTZsFajb.d.mts} +3149 -117
  8. package/dist/{customTool.types-BAmEh3MB.d.mts → customTool.types-D_w21L56.d.mts} +784 -56
  9. package/dist/docs/reference/sdk-reference/typescript/auth-configs.mdx +10 -10
  10. package/dist/docs/reference/sdk-reference/typescript/composio.mdx +7 -3
  11. package/dist/docs/reference/sdk-reference/typescript/connected-accounts.mdx +101 -18
  12. package/dist/docs/reference/sdk-reference/typescript/custom-toolkits.mdx +123 -0
  13. package/dist/docs/reference/sdk-reference/typescript/experimental.mdx +9 -2
  14. package/dist/docs/reference/sdk-reference/typescript/index.mdx +8 -0
  15. package/dist/docs/reference/sdk-reference/typescript/keyring.mdx +56 -0
  16. package/dist/docs/reference/sdk-reference/typescript/logs.mdx +78 -0
  17. package/dist/docs/reference/sdk-reference/typescript/mcp.mdx +15 -15
  18. package/dist/docs/reference/sdk-reference/typescript/meta.json +9 -1
  19. package/dist/docs/reference/sdk-reference/typescript/session-configs.mdx +83 -0
  20. package/dist/docs/reference/sdk-reference/typescript/session-files.mdx +10 -10
  21. package/dist/docs/reference/sdk-reference/typescript/session.mdx +86 -27
  22. package/dist/docs/reference/sdk-reference/typescript/sessions.mdx +26 -6
  23. package/dist/docs/reference/sdk-reference/typescript/toolkits.mdx +149 -12
  24. package/dist/docs/reference/sdk-reference/typescript/tools.mdx +18 -18
  25. package/dist/docs/reference/sdk-reference/typescript/triggers.mdx +25 -25
  26. package/dist/docs/reference/sdk-reference/typescript/usage.mdx +78 -0
  27. package/dist/docs/reference/sdk-reference/typescript/webhook-endpoints.mdx +162 -0
  28. package/dist/docs/reference/sdk-reference/typescript/webhook-subscriptions.mdx +218 -0
  29. package/dist/docs/reference/sdk-reference/typescript/webhooks.mdx +20 -0
  30. package/dist/{errors-BuEKehbI.mjs → errors-Dyiu3ifQ.mjs} +127 -4
  31. package/dist/experimental/index.d.mts +2 -2
  32. package/dist/experimental/index.mjs +1 -1
  33. package/dist/{fileUtils.node-L7XD8UPr.mjs → fileUtils.node-DNLhLg0W.mjs} +4 -4
  34. package/dist/index.d.mts +281 -55
  35. package/dist/index.mjs +3552 -949
  36. package/dist/models/Files.node.mjs +2 -2
  37. package/dist/{sensitiveFileUploadPaths-B6pBt9lO.mjs → sensitiveFileUploadPaths-BlLp-Yo2.mjs} +1 -1
  38. package/dist/{ssrfGuard.node-B9xQB4za.mjs → ssrfGuard.node-BZ270bcu.mjs} +1 -1
  39. package/dist/{types-CxLPO0Xq.d.mts → types-CgRsUGqm.d.mts} +2 -2
  40. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
  41. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
  42. package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
  43. package/dist/utils/modifiers/FileToolModifier.node.mjs +5 -5
  44. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
  45. package/dist/utils/ssrfGuard.node.mjs +1 -1
  46. package/dist/utils/ssrfGuard.workerd.mjs +1 -1
  47. package/package.json +4 -2
  48. package/src/composio.ts +215 -10
  49. package/src/errors/ConnectedAccountsErrors.ts +47 -0
  50. package/src/errors/SDKErrors.ts +52 -0
  51. package/src/errors/ToolRouterErrors.ts +61 -0
  52. package/src/errors/index.ts +3 -0
  53. package/src/index.ts +13 -0
  54. package/src/lib/sessionConfigConflict.ts +43 -0
  55. package/src/lib/toolRouterMcp.ts +132 -0
  56. package/src/lib/toolRouterParams.ts +149 -37
  57. package/src/lib/toolRouterSourceSessionConfig.ts +12 -0
  58. package/src/models/ConnectedAccounts.ts +118 -2
  59. package/src/models/CustomToolkits.ts +169 -0
  60. package/src/models/Experimental.ts +27 -0
  61. package/src/models/Keyring.ts +65 -0
  62. package/src/models/Logs.ts +101 -0
  63. package/src/models/RemoteFile.ts +25 -8
  64. package/src/models/SessionConfigs.ts +117 -0
  65. package/src/models/ToolRouter.ts +61 -17
  66. package/src/models/ToolRouterSession.ts +149 -14
  67. package/src/models/Toolkits.ts +180 -0
  68. package/src/models/Tools.ts +10 -6
  69. package/src/models/Triggers.ts +3 -88
  70. package/src/models/Usage.ts +119 -0
  71. package/src/models/Webhooks.ts +520 -0
  72. package/src/services/pusher/Pusher.ts +17 -6
  73. package/src/types/authConfigs.types.ts +2 -0
  74. package/src/types/connectedAccounts.types.ts +54 -0
  75. package/src/types/customToolkits.types.ts +102 -0
  76. package/src/types/keyring.types.ts +32 -0
  77. package/src/types/logs.types.ts +108 -0
  78. package/src/types/sessionConfigs.types.ts +81 -0
  79. package/src/types/tool.types.ts +2 -0
  80. package/src/types/toolRouter.types.ts +352 -16
  81. package/src/types/toolkit.types.ts +144 -0
  82. package/src/types/usage.types.ts +81 -0
  83. package/src/types/webhooks.types.ts +143 -0
  84. package/src/utils/constants.ts +1 -5
  85. package/src/utils/logger.ts +39 -7
  86. package/src/utils/safePath.ts +172 -0
  87. package/src/utils/sdk.ts +385 -22
  88. package/src/utils/transformers/connectedAccounts.ts +37 -2
  89. package/src/utils/transformers/customToolkits.ts +98 -0
  90. package/src/utils/transformers/keyring.ts +24 -0
  91. package/src/utils/transformers/logs.ts +85 -0
  92. package/src/utils/transformers/sessionConfigs.ts +54 -0
  93. package/src/utils/transformers/toolRouterResponseTransform.ts +6 -0
  94. package/src/utils/transformers/toolkits.ts +106 -3
  95. package/src/utils/transformers/triggers.ts +2 -2
  96. package/src/utils/transformers/usage.ts +77 -0
  97. package/src/utils/transformers/webhooks.ts +139 -0
@@ -3,7 +3,7 @@ import z, { z as z$1 } from "zod/v3";
3
3
  import { z as z$2 } from "zod/v4";
4
4
  import { CustomCreateResponse, GenerateURLResponse, McpCreateResponse } from "@composio/client/resources/mcp";
5
5
  import { ConnectedAccountUpdateStatusParams as UpdateConnectedAccountParams } from "@composio/client/resources/connected-accounts";
6
- import { SessionCreateParams, SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
6
+ import { SessionConfigHistoryResponse, SessionCreateParams, SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
7
7
  //#region src/types/tool.types.d.ts
8
8
  /**
9
9
  * Toolkit is the collection of tools,
@@ -3686,18 +3686,22 @@ declare const ToolExecuteResponseSchema: z$1.ZodObject<{
3686
3686
  successful: z$1.ZodBoolean;
3687
3687
  logId: z$1.ZodOptional<z$1.ZodString>;
3688
3688
  sessionInfo: z$1.ZodOptional<z$1.ZodUnknown>;
3689
+ /** Actual premium usage charge when the Session opts into returning it. */
3690
+ premiumCharge: z$1.ZodOptional<z$1.ZodUnknown>;
3689
3691
  }, "strip", z$1.ZodTypeAny, {
3690
3692
  data: Record<string, unknown>;
3691
3693
  error: string | null;
3692
3694
  successful: boolean;
3693
3695
  logId?: string | undefined;
3694
3696
  sessionInfo?: unknown;
3697
+ premiumCharge?: unknown;
3695
3698
  }, {
3696
3699
  data: Record<string, unknown>;
3697
3700
  error: string | null;
3698
3701
  successful: boolean;
3699
3702
  logId?: string | undefined;
3700
3703
  sessionInfo?: unknown;
3704
+ premiumCharge?: unknown;
3701
3705
  }>;
3702
3706
  type ToolExecuteResponse = z$1.infer<typeof ToolExecuteResponseSchema>;
3703
3707
  declare const ToolProxyParamsSchema: z$1.ZodObject<{
@@ -29696,19 +29700,19 @@ type CreateConnectedAccountResponse = z$1.infer<typeof CreateConnectedAccountRes
29696
29700
  declare const ConnectedAccountAuthConfigSchema: z$1.ZodObject<{
29697
29701
  id: z$1.ZodString;
29698
29702
  /** @deprecated Use `connectedAccount.state.authScheme` instead. */
29699
- authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "S2S_OAUTH2"]>>;
29703
+ authScheme: z$1.ZodOptional<z$1.ZodEnum<["OAUTH2", "OAUTH1", "API_KEY", "BASIC", "BILLCOM_AUTH", "BEARER_TOKEN", "GOOGLE_SERVICE_ACCOUNT", "NO_AUTH", "BASIC_WITH_JWT", "CALCOM_AUTH", "SERVICE_ACCOUNT", "SAML", "DCR_OAUTH", "CIMD_OAUTH", "S2S_OAUTH2"]>>;
29700
29704
  isComposioManaged: z$1.ZodBoolean;
29701
29705
  isDisabled: z$1.ZodBoolean;
29702
29706
  }, "strip", z$1.ZodTypeAny, {
29703
29707
  id: string;
29704
29708
  isComposioManaged: boolean;
29705
29709
  isDisabled: boolean;
29706
- 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;
29710
+ 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" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
29707
29711
  }, {
29708
29712
  id: string;
29709
29713
  isComposioManaged: boolean;
29710
29714
  isDisabled: boolean;
29711
- 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;
29715
+ 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" | "CIMD_OAUTH" | "S2S_OAUTH2" | undefined;
29712
29716
  }>;
29713
29717
  type ConnectedAccountAuthConfig = z$1.infer<typeof ConnectedAccountAuthConfigSchema>;
29714
29718
  declare const ConnectedAccountRetrieveResponseSchema: z$1.ZodType<{
@@ -29969,6 +29973,10 @@ declare const CreateConnectedAccountLinkResponseSchema: z$1.ZodObject<{
29969
29973
  type CreateConnectedAccountLinkResponse = z$1.infer<typeof CreateConnectedAccountLinkResponseSchema>;
29970
29974
  declare const ConnectedAccountRefreshOptionsSchema: z$1.ZodObject<{
29971
29975
  redirectUrl: z$1.ZodOptional<z$1.ZodString>;
29976
+ /**
29977
+ * @deprecated The Composio API no longer accepts this field. It is ignored
29978
+ * and `refresh()` logs a warning when it is set.
29979
+ */
29972
29980
  validateCredentials: z$1.ZodOptional<z$1.ZodBoolean>;
29973
29981
  }, "strip", z$1.ZodTypeAny, {
29974
29982
  redirectUrl?: string | undefined;
@@ -30019,6 +30027,74 @@ declare const UpdateConnectedAccountAclParamsSchema: z$1.ZodEffects<z$1.ZodObjec
30019
30027
  notAllowedUserIds?: string[] | undefined;
30020
30028
  }>;
30021
30029
  type UpdateConnectedAccountAclParams = z$1.infer<typeof UpdateConnectedAccountAclParamsSchema>;
30030
+ /**
30031
+ * Response of `composio.connectedAccounts.revoke()`.
30032
+ */
30033
+ declare const ConnectedAccountRevokedTokenSchema: z$1.ZodEnum<["access_token", "refresh_token", "credential"]>;
30034
+ type ConnectedAccountRevokedToken = z$1.infer<typeof ConnectedAccountRevokedTokenSchema>;
30035
+ declare const ConnectedAccountRevokeResponseSchema: z$1.ZodObject<{
30036
+ /**
30037
+ * Tokens revoked at the provider on this call. An empty array means the
30038
+ * connection was already revoked (no upstream dispatch).
30039
+ */
30040
+ revokedTokens: z$1.ZodArray<z$1.ZodEnum<["access_token", "refresh_token", "credential"]>, "many">;
30041
+ connectedAccount: z$1.ZodObject<{
30042
+ id: z$1.ZodString;
30043
+ /** The connection status after this call (`REVOKED` on success). */
30044
+ status: z$1.ZodEnum<["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED", "INACTIVE", "REVOKED"]>;
30045
+ }, "strip", z$1.ZodTypeAny, {
30046
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE" | "REVOKED";
30047
+ id: string;
30048
+ }, {
30049
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE" | "REVOKED";
30050
+ id: string;
30051
+ }>;
30052
+ }, "strip", z$1.ZodTypeAny, {
30053
+ connectedAccount: {
30054
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE" | "REVOKED";
30055
+ id: string;
30056
+ };
30057
+ revokedTokens: ("access_token" | "refresh_token" | "credential")[];
30058
+ }, {
30059
+ connectedAccount: {
30060
+ status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE" | "REVOKED";
30061
+ id: string;
30062
+ };
30063
+ revokedTokens: ("access_token" | "refresh_token" | "credential")[];
30064
+ }>;
30065
+ type ConnectedAccountRevokeResponse = z$1.infer<typeof ConnectedAccountRevokeResponseSchema>;
30066
+ /**
30067
+ * Params for `composio.connectedAccounts.completeAuth()`.
30068
+ */
30069
+ declare const ConnectedAccountCompleteAuthParamsSchema: z$1.ZodObject<{
30070
+ /** The user the connection was initiated for. Must match the connection owner. */
30071
+ userId: z$1.ZodString;
30072
+ /** The opaque, single-use session URI your OAuth callback verifier received. */
30073
+ sessionUri: z$1.ZodString;
30074
+ }, "strip", z$1.ZodTypeAny, {
30075
+ userId: string;
30076
+ sessionUri: string;
30077
+ }, {
30078
+ userId: string;
30079
+ sessionUri: string;
30080
+ }>;
30081
+ type ConnectedAccountCompleteAuthParams = z$1.infer<typeof ConnectedAccountCompleteAuthParamsSchema>;
30082
+ /**
30083
+ * Response of `composio.connectedAccounts.completeAuth()`.
30084
+ */
30085
+ declare const ConnectedAccountCompleteAuthResponseSchema: z$1.ZodObject<{
30086
+ /** The connection that was completed; it is now `ACTIVE`. */
30087
+ connectedAccountId: z$1.ZodString;
30088
+ /** The toolkit the connection belongs to. */
30089
+ toolkitSlug: z$1.ZodString;
30090
+ }, "strip", z$1.ZodTypeAny, {
30091
+ connectedAccountId: string;
30092
+ toolkitSlug: string;
30093
+ }, {
30094
+ connectedAccountId: string;
30095
+ toolkitSlug: string;
30096
+ }>;
30097
+ type ConnectedAccountCompleteAuthResponse = z$1.infer<typeof ConnectedAccountCompleteAuthResponseSchema>;
30022
30098
  //#endregion
30023
30099
  //#region src/types/connectionRequest.types.d.ts
30024
30100
  interface ConnectionRequestState {
@@ -30265,7 +30341,18 @@ declare class RemoteFile {
30265
30341
  * @throws ValidationError if the response shape is invalid
30266
30342
  */
30267
30343
  static parse(data: unknown): RemoteFile;
30268
- /** Filename extracted from the mount path (e.g. "report.pdf" from "output/report.pdf") */
30344
+ /**
30345
+ * Filename extracted from the mount path (e.g. "report.pdf" from "output/report.pdf").
30346
+ *
30347
+ * Deliberately non-throwing: this is a display value, and `downloadBytes()`
30348
+ * reads it while constructing `RemoteFileDownloadError`. A validator here
30349
+ * would replace a genuine download error with a validation error thrown from
30350
+ * inside the error constructor. {@link save} validates instead, at the point
30351
+ * the value actually becomes a path.
30352
+ *
30353
+ * Both `/` and `\` count as separators, as in the Python SDK, so a mount path
30354
+ * crafted for a Windows target is reduced the same way on every platform.
30355
+ */
30269
30356
  get filename(): string;
30270
30357
  private downloadError;
30271
30358
  private downloadBytes;
@@ -30294,6 +30381,7 @@ declare class RemoteFile {
30294
30381
  * @param path - Local path to save the file. If omitted, saves to the Composio temp directory using the filename from the mount path.
30295
30382
  * @returns The absolute path where the file was saved
30296
30383
  * @throws Error if file system is not supported or the save fails
30384
+ * @throws ValidationError if `path` is omitted and the mount path yields no usable filename
30297
30385
  */
30298
30386
  save(path?: string): Promise<string>;
30299
30387
  }
@@ -30493,6 +30581,66 @@ declare const ToolRouterToolkitsEnabledConfigSchema: z.ZodObject<{
30493
30581
  }, {
30494
30582
  enable: string[];
30495
30583
  }>;
30584
+ /** Experimental premium usage policy for a Session. */
30585
+ declare const ToolRouterPremiumUsageSchema: z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
30586
+ toolkits: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
30587
+ enable: z.ZodArray<z.ZodString, "many">;
30588
+ }, "strict", z.ZodTypeAny, {
30589
+ enable: string[];
30590
+ }, {
30591
+ enable: string[];
30592
+ }>, z.ZodObject<{
30593
+ disable: z.ZodArray<z.ZodString, "many">;
30594
+ }, "strict", z.ZodTypeAny, {
30595
+ disable: string[];
30596
+ }, {
30597
+ disable: string[];
30598
+ }>]>>;
30599
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
30600
+ enable: z.ZodArray<z.ZodString, "many">;
30601
+ }, "strict", z.ZodTypeAny, {
30602
+ enable: string[];
30603
+ }, {
30604
+ enable: string[];
30605
+ }>, z.ZodObject<{
30606
+ disable: z.ZodArray<z.ZodString, "many">;
30607
+ }, "strict", z.ZodTypeAny, {
30608
+ disable: string[];
30609
+ }, {
30610
+ disable: string[];
30611
+ }>]>>>;
30612
+ /**
30613
+ * Return the actual premium charge in Session tool responses. Controls
30614
+ * visibility only; on update, any policy object still re-enables premium
30615
+ * usage on a Session set to `false`.
30616
+ */
30617
+ returnPremiumCharge: z.ZodOptional<z.ZodBoolean>;
30618
+ }, "strict", z.ZodTypeAny, {
30619
+ tools?: Record<string, {
30620
+ enable: string[];
30621
+ } | {
30622
+ disable: string[];
30623
+ }> | undefined;
30624
+ toolkits?: {
30625
+ disable: string[];
30626
+ } | {
30627
+ enable: string[];
30628
+ } | undefined;
30629
+ returnPremiumCharge?: boolean | undefined;
30630
+ }, {
30631
+ tools?: Record<string, {
30632
+ enable: string[];
30633
+ } | {
30634
+ disable: string[];
30635
+ }> | undefined;
30636
+ toolkits?: {
30637
+ disable: string[];
30638
+ } | {
30639
+ enable: string[];
30640
+ } | undefined;
30641
+ returnPremiumCharge?: boolean | undefined;
30642
+ }>]>;
30643
+ type ToolRouterPremiumUsage = z.infer<typeof ToolRouterPremiumUsageSchema>;
30496
30644
  declare const ToolRouterManageConnectionsConfigSchema: z.ZodObject<{
30497
30645
  enable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
30498
30646
  callbackUrl: z.ZodOptional<z.ZodString>;
@@ -30680,6 +30828,64 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30680
30828
  }, {
30681
30829
  enable: string[];
30682
30830
  }>]>>>;
30831
+ premiumUsage: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
30832
+ toolkits: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
30833
+ enable: z.ZodArray<z.ZodString, "many">;
30834
+ }, "strict", z.ZodTypeAny, {
30835
+ enable: string[];
30836
+ }, {
30837
+ enable: string[];
30838
+ }>, z.ZodObject<{
30839
+ disable: z.ZodArray<z.ZodString, "many">;
30840
+ }, "strict", z.ZodTypeAny, {
30841
+ disable: string[];
30842
+ }, {
30843
+ disable: string[];
30844
+ }>]>>;
30845
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
30846
+ enable: z.ZodArray<z.ZodString, "many">;
30847
+ }, "strict", z.ZodTypeAny, {
30848
+ enable: string[];
30849
+ }, {
30850
+ enable: string[];
30851
+ }>, z.ZodObject<{
30852
+ disable: z.ZodArray<z.ZodString, "many">;
30853
+ }, "strict", z.ZodTypeAny, {
30854
+ disable: string[];
30855
+ }, {
30856
+ disable: string[];
30857
+ }>]>>>;
30858
+ /**
30859
+ * Return the actual premium charge in Session tool responses. Controls
30860
+ * visibility only; on update, any policy object still re-enables premium
30861
+ * usage on a Session set to `false`.
30862
+ */
30863
+ returnPremiumCharge: z.ZodOptional<z.ZodBoolean>;
30864
+ }, "strict", z.ZodTypeAny, {
30865
+ tools?: Record<string, {
30866
+ enable: string[];
30867
+ } | {
30868
+ disable: string[];
30869
+ }> | undefined;
30870
+ toolkits?: {
30871
+ disable: string[];
30872
+ } | {
30873
+ enable: string[];
30874
+ } | undefined;
30875
+ returnPremiumCharge?: boolean | undefined;
30876
+ }, {
30877
+ tools?: Record<string, {
30878
+ enable: string[];
30879
+ } | {
30880
+ disable: string[];
30881
+ }> | undefined;
30882
+ toolkits?: {
30883
+ disable: string[];
30884
+ } | {
30885
+ enable: string[];
30886
+ } | undefined;
30887
+ returnPremiumCharge?: boolean | undefined;
30888
+ }>]>>>;
30683
30889
  authConfigs: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>>;
30684
30890
  connectedAccounts: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>>;
30685
30891
  manageConnections: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
@@ -30757,18 +30963,21 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30757
30963
  }>>;
30758
30964
  customTools: z.ZodOptional<z.ZodArray<z.ZodType<CustomTool, z.ZodTypeDef, CustomTool>, "many">>;
30759
30965
  customToolkits: z.ZodOptional<z.ZodArray<z.ZodType<CustomToolkit, z.ZodTypeDef, CustomToolkit>, "many">>;
30966
+ sessionConfigId: z.ZodOptional<z.ZodString>;
30760
30967
  }, "strip", z.ZodTypeAny, {
30761
30968
  assistivePrompt?: {
30762
30969
  userTimezone?: string | undefined;
30763
30970
  } | undefined;
30764
30971
  customTools?: CustomTool[] | undefined;
30765
30972
  customToolkits?: CustomToolkit[] | undefined;
30973
+ sessionConfigId?: string | undefined;
30766
30974
  }, {
30767
30975
  assistivePrompt?: {
30768
30976
  userTimezone?: string | undefined;
30769
30977
  } | undefined;
30770
30978
  customTools?: CustomTool[] | undefined;
30771
30979
  customToolkits?: CustomToolkit[] | undefined;
30980
+ sessionConfigId?: string | undefined;
30772
30981
  }>>>;
30773
30982
  }, "strip", z.ZodTypeAny, {
30774
30983
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
@@ -30795,6 +31004,19 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30795
31004
  } | undefined;
30796
31005
  sessionPreset?: "direct_tools" | undefined;
30797
31006
  mcp?: boolean | undefined;
31007
+ premiumUsage?: false | {
31008
+ tools?: Record<string, {
31009
+ enable: string[];
31010
+ } | {
31011
+ disable: string[];
31012
+ }> | undefined;
31013
+ toolkits?: {
31014
+ disable: string[];
31015
+ } | {
31016
+ enable: string[];
31017
+ } | undefined;
31018
+ returnPremiumCharge?: boolean | undefined;
31019
+ } | undefined;
30798
31020
  authConfigs?: Record<string, string> | undefined;
30799
31021
  connectedAccounts?: Record<string, string | string[]> | undefined;
30800
31022
  manageConnections?: boolean | {
@@ -30825,6 +31047,7 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30825
31047
  } | undefined;
30826
31048
  customTools?: CustomTool[] | undefined;
30827
31049
  customToolkits?: CustomToolkit[] | undefined;
31050
+ sessionConfigId?: string | undefined;
30828
31051
  } | undefined;
30829
31052
  }, {
30830
31053
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
@@ -30851,6 +31074,19 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30851
31074
  } | undefined;
30852
31075
  sessionPreset?: "direct_tools" | undefined;
30853
31076
  mcp?: boolean | undefined;
31077
+ premiumUsage?: false | {
31078
+ tools?: Record<string, {
31079
+ enable: string[];
31080
+ } | {
31081
+ disable: string[];
31082
+ }> | undefined;
31083
+ toolkits?: {
31084
+ disable: string[];
31085
+ } | {
31086
+ enable: string[];
31087
+ } | undefined;
31088
+ returnPremiumCharge?: boolean | undefined;
31089
+ } | undefined;
30854
31090
  authConfigs?: Record<string, string> | undefined;
30855
31091
  connectedAccounts?: Record<string, string | string[]> | undefined;
30856
31092
  manageConnections?: boolean | {
@@ -30881,6 +31117,7 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30881
31117
  } | undefined;
30882
31118
  customTools?: CustomTool[] | undefined;
30883
31119
  customToolkits?: CustomToolkit[] | undefined;
31120
+ sessionConfigId?: string | undefined;
30884
31121
  } | undefined;
30885
31122
  }>, {
30886
31123
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
@@ -30907,6 +31144,19 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30907
31144
  } | undefined;
30908
31145
  sessionPreset?: "direct_tools" | undefined;
30909
31146
  mcp?: boolean | undefined;
31147
+ premiumUsage?: false | {
31148
+ tools?: Record<string, {
31149
+ enable: string[];
31150
+ } | {
31151
+ disable: string[];
31152
+ }> | undefined;
31153
+ toolkits?: {
31154
+ disable: string[];
31155
+ } | {
31156
+ enable: string[];
31157
+ } | undefined;
31158
+ returnPremiumCharge?: boolean | undefined;
31159
+ } | undefined;
30910
31160
  authConfigs?: Record<string, string> | undefined;
30911
31161
  connectedAccounts?: Record<string, string | string[]> | undefined;
30912
31162
  manageConnections?: boolean | {
@@ -30937,6 +31187,7 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30937
31187
  } | undefined;
30938
31188
  customTools?: CustomTool[] | undefined;
30939
31189
  customToolkits?: CustomToolkit[] | undefined;
31190
+ sessionConfigId?: string | undefined;
30940
31191
  } | undefined;
30941
31192
  }, {
30942
31193
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
@@ -30963,6 +31214,19 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30963
31214
  } | undefined;
30964
31215
  sessionPreset?: "direct_tools" | undefined;
30965
31216
  mcp?: boolean | undefined;
31217
+ premiumUsage?: false | {
31218
+ tools?: Record<string, {
31219
+ enable: string[];
31220
+ } | {
31221
+ disable: string[];
31222
+ }> | undefined;
31223
+ toolkits?: {
31224
+ disable: string[];
31225
+ } | {
31226
+ enable: string[];
31227
+ } | undefined;
31228
+ returnPremiumCharge?: boolean | undefined;
31229
+ } | undefined;
30966
31230
  authConfigs?: Record<string, string> | undefined;
30967
31231
  connectedAccounts?: Record<string, string | string[]> | undefined;
30968
31232
  manageConnections?: boolean | {
@@ -30993,6 +31257,7 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
30993
31257
  } | undefined;
30994
31258
  customTools?: CustomTool[] | undefined;
30995
31259
  customToolkits?: CustomToolkit[] | undefined;
31260
+ sessionConfigId?: string | undefined;
30996
31261
  } | undefined;
30997
31262
  }>, {
30998
31263
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
@@ -31019,6 +31284,19 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31019
31284
  } | undefined;
31020
31285
  sessionPreset?: "direct_tools" | undefined;
31021
31286
  mcp?: boolean | undefined;
31287
+ premiumUsage?: false | {
31288
+ tools?: Record<string, {
31289
+ enable: string[];
31290
+ } | {
31291
+ disable: string[];
31292
+ }> | undefined;
31293
+ toolkits?: {
31294
+ disable: string[];
31295
+ } | {
31296
+ enable: string[];
31297
+ } | undefined;
31298
+ returnPremiumCharge?: boolean | undefined;
31299
+ } | undefined;
31022
31300
  authConfigs?: Record<string, string> | undefined;
31023
31301
  connectedAccounts?: Record<string, string | string[]> | undefined;
31024
31302
  manageConnections?: boolean | {
@@ -31049,6 +31327,7 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31049
31327
  } | undefined;
31050
31328
  customTools?: CustomTool[] | undefined;
31051
31329
  customToolkits?: CustomToolkit[] | undefined;
31330
+ sessionConfigId?: string | undefined;
31052
31331
  } | undefined;
31053
31332
  }, unknown>;
31054
31333
  /**
@@ -31060,6 +31339,7 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31060
31339
  * @param {Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>} tags - Global tags to filter tools by behavior
31061
31340
  * @param {Record<string, string>} authConfigs - The auth configs to use in the tool router session
31062
31341
  * @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.
31342
+ * @param {ToolRouterPremiumUsage} [premiumUsage] - Experimental premium usage policy. The project must allow premium usage.
31063
31343
  * @param {ToolRouterConfigManageConnectionsSchema | boolean} manageConnections - The config for the manage connections in the tool router session. Defaults to true, if set to false, you need to manage connections manually. If set to an object, you can configure the manage connections settings.
31064
31344
  * @param {boolean} [manageConnections.enable] - Whether to use tools to manage connections in the tool router session @default true
31065
31345
  * @param {string} [manageConnections.callbackUrl] - The callback url to use in the tool router session
@@ -31075,8 +31355,29 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
31075
31355
  * @param {boolean} [multiAccount.requireExplicitSelection] - When true, require explicit account selection when multiple accounts are connected
31076
31356
  * @param {object} [preload] - Tools to preload into session.tools() and the MCP tool list
31077
31357
  * @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.
31358
+ * @param {object} [experimental] - Experimental features configuration. Not stable; may change or be removed.
31359
+ * @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.
31078
31360
  */
31079
- type ToolRouterCreateSessionConfig = z.infer<typeof ToolRouterCreateSessionConfigSchema>;
31361
+ type ToolRouterCreateSessionConfig = InlineAccessCreateSessionConfig | SavedConfigCreateSessionConfig;
31362
+ type ParsedCreateSessionConfig = z.infer<typeof ToolRouterCreateSessionConfigSchema>;
31363
+ type ParsedCreateSessionExperimental = NonNullable<ParsedCreateSessionConfig['experimental']>;
31364
+ /** Create input that sets access inline and applies no saved Session config. */
31365
+ type InlineAccessCreateSessionConfig = Omit<ParsedCreateSessionConfig, 'experimental'> & {
31366
+ experimental?: Omit<ParsedCreateSessionExperimental, 'sessionConfigId'> & {
31367
+ sessionConfigId?: never;
31368
+ };
31369
+ };
31370
+ /** Create input that takes its access policy from a saved Session config. */
31371
+ type SavedConfigCreateSessionConfig = Omit<ParsedCreateSessionConfig, 'toolkits' | 'tools' | 'tags' | 'experimental'> & {
31372
+ toolkits?: never;
31373
+ tools?: never;
31374
+ tags?: never;
31375
+ experimental: Omit<ParsedCreateSessionExperimental, 'sessionConfigId' | 'customTools' | 'customToolkits'> & {
31376
+ sessionConfigId: string;
31377
+ customTools?: never;
31378
+ customToolkits?: never;
31379
+ };
31380
+ };
31080
31381
  declare const ToolkitConnectionStateSchema: z.ZodObject<{
31081
31382
  slug: z.ZodString;
31082
31383
  name: z.ZodString;
@@ -31468,6 +31769,14 @@ declare const ToolRouterSessionSearchResponseSchema: z.ZodObject<{
31468
31769
  statusMessage: z.ZodString;
31469
31770
  connectionDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
31470
31771
  currentUserInfo: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
31772
+ /** Present when the toolkit runs on a Composio hosted account; only these tools run on it. */
31773
+ hostedAccount: z.ZodOptional<z.ZodObject<{
31774
+ allowedToolSlugs: z.ZodArray<z.ZodString, "many">;
31775
+ }, "strip", z.ZodTypeAny, {
31776
+ allowedToolSlugs: string[];
31777
+ }, {
31778
+ allowedToolSlugs: string[];
31779
+ }>>;
31471
31780
  }, "strip", z.ZodTypeAny, {
31472
31781
  description: string;
31473
31782
  toolkit: string;
@@ -31475,6 +31784,9 @@ declare const ToolRouterSessionSearchResponseSchema: z.ZodObject<{
31475
31784
  statusMessage: string;
31476
31785
  connectionDetails?: Record<string, unknown> | undefined;
31477
31786
  currentUserInfo?: Record<string, unknown> | undefined;
31787
+ hostedAccount?: {
31788
+ allowedToolSlugs: string[];
31789
+ } | undefined;
31478
31790
  }, {
31479
31791
  description: string;
31480
31792
  toolkit: string;
@@ -31482,6 +31794,9 @@ declare const ToolRouterSessionSearchResponseSchema: z.ZodObject<{
31482
31794
  statusMessage: string;
31483
31795
  connectionDetails?: Record<string, unknown> | undefined;
31484
31796
  currentUserInfo?: Record<string, unknown> | undefined;
31797
+ hostedAccount?: {
31798
+ allowedToolSlugs: string[];
31799
+ } | undefined;
31485
31800
  }>, "many">;
31486
31801
  nextStepsGuidance: z.ZodArray<z.ZodString, "many">;
31487
31802
  session: z.ZodObject<{
@@ -31553,6 +31868,9 @@ declare const ToolRouterSessionSearchResponseSchema: z.ZodObject<{
31553
31868
  statusMessage: string;
31554
31869
  connectionDetails?: Record<string, unknown> | undefined;
31555
31870
  currentUserInfo?: Record<string, unknown> | undefined;
31871
+ hostedAccount?: {
31872
+ allowedToolSlugs: string[];
31873
+ } | undefined;
31556
31874
  }[];
31557
31875
  nextStepsGuidance: string[];
31558
31876
  session: {
@@ -31608,6 +31926,9 @@ declare const ToolRouterSessionSearchResponseSchema: z.ZodObject<{
31608
31926
  statusMessage: string;
31609
31927
  connectionDetails?: Record<string, unknown> | undefined;
31610
31928
  currentUserInfo?: Record<string, unknown> | undefined;
31929
+ hostedAccount?: {
31930
+ allowedToolSlugs: string[];
31931
+ } | undefined;
31611
31932
  }[];
31612
31933
  nextStepsGuidance: string[];
31613
31934
  session: {
@@ -31626,14 +31947,18 @@ declare const ToolRouterSessionExecuteResponseSchema: z.ZodObject<{
31626
31947
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
31627
31948
  error: z.ZodNullable<z.ZodString>;
31628
31949
  logId: z.ZodString;
31950
+ /** Actual premium usage charge when the Session opts into returning it. */
31951
+ premiumCharge: z.ZodOptional<z.ZodUnknown>;
31629
31952
  }, "strip", z.ZodTypeAny, {
31630
31953
  data: Record<string, unknown>;
31631
31954
  error: string | null;
31632
31955
  logId: string;
31956
+ premiumCharge?: unknown;
31633
31957
  }, {
31634
31958
  data: Record<string, unknown>;
31635
31959
  error: string | null;
31636
31960
  logId: string;
31961
+ premiumCharge?: unknown;
31637
31962
  }>;
31638
31963
  type ToolRouterSessionExecuteResponse = z.infer<typeof ToolRouterSessionExecuteResponseSchema>;
31639
31964
  interface ToolRouterSessionProxyExecuteResponse {
@@ -31665,6 +31990,16 @@ interface SessionExperimental {
31665
31990
  * File mount operations (list, upload, download, delete) for the session's virtual filesystem.
31666
31991
  */
31667
31992
  files: ToolRouterSessionFilesMount;
31993
+ /**
31994
+ * The last saved Session config applied to this session, set from the
31995
+ * create, `use()` and `update()` responses. Later inline access updates
31996
+ * keep it. It reflects the last response this object saw: an update from
31997
+ * another process leaves it stale until `sessions.use()`.
31998
+ * @experimental
31999
+ */
32000
+ sourceSessionConfig?: {
32001
+ id: string;
32002
+ };
31668
32003
  }
31669
32004
  type ToolRouterSessionSearchFn = (params: {
31670
32005
  query: string;
@@ -31747,8 +32082,144 @@ declare const SessionProxyExecuteParamsSchema: z.ZodObject<{
31747
32082
  }>;
31748
32083
  type SessionProxyExecuteParams = z.infer<typeof SessionProxyExecuteParamsSchema>;
31749
32084
  type ToolRouterSessionProxyExecuteFn = (params: SessionProxyExecuteParams) => Promise<ToolRouterSessionProxyExecuteResponse>;
32085
+ /**
32086
+ * `manageConnections` shape accepted by `session.update()`. Unlike the create
32087
+ * schema, `callbackUrl: null` removes the stored callback URL while leaving
32088
+ * the sibling connection settings untouched.
32089
+ */
32090
+ declare const ToolRouterUpdateManageConnectionsSchema: z.ZodObject<{
32091
+ enable: z.ZodOptional<z.ZodBoolean>;
32092
+ callbackUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32093
+ waitForConnections: z.ZodOptional<z.ZodBoolean>;
32094
+ enableConnectionRemoval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
32095
+ }, "strict", z.ZodTypeAny, {
32096
+ enable?: boolean | undefined;
32097
+ callbackUrl?: string | null | undefined;
32098
+ waitForConnections?: boolean | undefined;
32099
+ enableConnectionRemoval?: boolean | null | undefined;
32100
+ }, {
32101
+ enable?: boolean | undefined;
32102
+ callbackUrl?: string | null | undefined;
32103
+ waitForConnections?: boolean | undefined;
32104
+ enableConnectionRemoval?: boolean | null | undefined;
32105
+ }>;
32106
+ type ToolRouterUpdateManageConnectionsConfig = z.infer<typeof ToolRouterUpdateManageConnectionsSchema>;
32107
+ /**
32108
+ * `experimental` block accepted by `session.update()`. Each leaf follows the
32109
+ * PATCH contract of the API: omit to keep the stored value, `null` to remove
32110
+ * it, a value to replace it.
32111
+ */
32112
+ declare const ToolRouterUpdateExperimentalSchema: z.ZodObject<{
32113
+ permissions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
32114
+ default: z.ZodEnum<["allow_all", "ask_every_call", "ask_once_per_session"]>;
32115
+ overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["always_allow", "always_deny", "ask_once", "ask_always"]>>>;
32116
+ }, "strict", z.ZodTypeAny, {
32117
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32118
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32119
+ }, {
32120
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32121
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32122
+ }>>>;
32123
+ linkUrlOverwrite: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32124
+ fastMode: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
32125
+ submitFeedback: z.ZodOptional<z.ZodNullable<z.ZodObject<{
32126
+ enable: z.ZodBoolean;
32127
+ }, "strict", z.ZodTypeAny, {
32128
+ enable: boolean;
32129
+ }, {
32130
+ enable: boolean;
32131
+ }>>>;
32132
+ sessionConfigId: z.ZodOptional<z.ZodString>;
32133
+ }, "strict", z.ZodTypeAny, {
32134
+ sessionConfigId?: string | undefined;
32135
+ permissions?: {
32136
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32137
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32138
+ } | null | undefined;
32139
+ linkUrlOverwrite?: string | null | undefined;
32140
+ fastMode?: boolean | null | undefined;
32141
+ submitFeedback?: {
32142
+ enable: boolean;
32143
+ } | null | undefined;
32144
+ }, {
32145
+ sessionConfigId?: string | undefined;
32146
+ permissions?: {
32147
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32148
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32149
+ } | null | undefined;
32150
+ linkUrlOverwrite?: string | null | undefined;
32151
+ fastMode?: boolean | null | undefined;
32152
+ submitFeedback?: {
32153
+ enable: boolean;
32154
+ } | null | undefined;
32155
+ }>;
32156
+ type ToolRouterUpdateExperimentalConfig = z.infer<typeof ToolRouterUpdateExperimentalSchema>;
32157
+ /**
32158
+ * Options for `session.update()`. For every policy block, omitting the key
32159
+ * preserves the stored value and `null` removes the stored override (which can
32160
+ * increase access: `toolkits: null` restores the unrestricted default, unlike
32161
+ * `toolkits: []`, which denies every app toolkit).
32162
+ */
31750
32163
  declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31751
- toolkits: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
32164
+ premiumUsage: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
32165
+ toolkits: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
32166
+ enable: z.ZodArray<z.ZodString, "many">;
32167
+ }, "strict", z.ZodTypeAny, {
32168
+ enable: string[];
32169
+ }, {
32170
+ enable: string[];
32171
+ }>, z.ZodObject<{
32172
+ disable: z.ZodArray<z.ZodString, "many">;
32173
+ }, "strict", z.ZodTypeAny, {
32174
+ disable: string[];
32175
+ }, {
32176
+ disable: string[];
32177
+ }>]>>;
32178
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
32179
+ enable: z.ZodArray<z.ZodString, "many">;
32180
+ }, "strict", z.ZodTypeAny, {
32181
+ enable: string[];
32182
+ }, {
32183
+ enable: string[];
32184
+ }>, z.ZodObject<{
32185
+ disable: z.ZodArray<z.ZodString, "many">;
32186
+ }, "strict", z.ZodTypeAny, {
32187
+ disable: string[];
32188
+ }, {
32189
+ disable: string[];
32190
+ }>]>>>;
32191
+ /**
32192
+ * Return the actual premium charge in Session tool responses. Controls
32193
+ * visibility only; on update, any policy object still re-enables premium
32194
+ * usage on a Session set to `false`.
32195
+ */
32196
+ returnPremiumCharge: z.ZodOptional<z.ZodBoolean>;
32197
+ }, "strict", z.ZodTypeAny, {
32198
+ tools?: Record<string, {
32199
+ enable: string[];
32200
+ } | {
32201
+ disable: string[];
32202
+ }> | undefined;
32203
+ toolkits?: {
32204
+ disable: string[];
32205
+ } | {
32206
+ enable: string[];
32207
+ } | undefined;
32208
+ returnPremiumCharge?: boolean | undefined;
32209
+ }, {
32210
+ tools?: Record<string, {
32211
+ enable: string[];
32212
+ } | {
32213
+ disable: string[];
32214
+ }> | undefined;
32215
+ toolkits?: {
32216
+ disable: string[];
32217
+ } | {
32218
+ enable: string[];
32219
+ } | undefined;
32220
+ returnPremiumCharge?: boolean | undefined;
32221
+ }>]>>>;
32222
+ toolkits: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
31752
32223
  disable: z.ZodArray<z.ZodString, "many">;
31753
32224
  }, "strict", z.ZodTypeAny, {
31754
32225
  disable: string[];
@@ -31760,8 +32231,8 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31760
32231
  enable: string[];
31761
32232
  }, {
31762
32233
  enable: string[];
31763
- }>]>>>;
31764
- tools: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
32234
+ }>]>>>>;
32235
+ tools: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
31765
32236
  enable: z.ZodArray<z.ZodString, "many">;
31766
32237
  }, "strict", z.ZodTypeAny, {
31767
32238
  enable: string[];
@@ -31812,8 +32283,8 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31812
32283
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31813
32284
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31814
32285
  };
31815
- }>]>>>>;
31816
- tags: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">, z.ZodObject<{
32286
+ }>]>>>>>;
32287
+ tags: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">, z.ZodObject<{
31817
32288
  enable: z.ZodOptional<z.ZodArray<z.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
31818
32289
  disable: z.ZodOptional<z.ZodArray<z.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
31819
32290
  }, "strict", z.ZodTypeAny, {
@@ -31822,21 +32293,24 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31822
32293
  }, {
31823
32294
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31824
32295
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31825
- }>]>>>;
31826
- authConfigs: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
31827
- connectedAccounts: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>, Record<string, string[]>, Record<string, string | string[]>>>>;
32296
+ }>]>>>>;
32297
+ authConfigs: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>>;
32298
+ connectedAccounts: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>, Record<string, string[]>, Record<string, string | string[]>>>>>;
31828
32299
  manageConnections: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
31829
- enable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
31830
- callbackUrl: z.ZodOptional<z.ZodString>;
32300
+ enable: z.ZodOptional<z.ZodBoolean>;
32301
+ callbackUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31831
32302
  waitForConnections: z.ZodOptional<z.ZodBoolean>;
32303
+ enableConnectionRemoval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
31832
32304
  }, "strict", z.ZodTypeAny, {
31833
32305
  enable?: boolean | undefined;
31834
- callbackUrl?: string | undefined;
32306
+ callbackUrl?: string | null | undefined;
31835
32307
  waitForConnections?: boolean | undefined;
32308
+ enableConnectionRemoval?: boolean | null | undefined;
31836
32309
  }, {
31837
32310
  enable?: boolean | undefined;
31838
- callbackUrl?: string | undefined;
32311
+ callbackUrl?: string | null | undefined;
31839
32312
  waitForConnections?: boolean | undefined;
32313
+ enableConnectionRemoval?: boolean | null | undefined;
31840
32314
  }>]>>>>;
31841
32315
  sandbox: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
31842
32316
  enable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
@@ -31872,29 +32346,88 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31872
32346
  }>>>>;
31873
32347
  multiAccount: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
31874
32348
  enable: z.ZodOptional<z.ZodBoolean>;
31875
- maxAccountsPerToolkit: z.ZodOptional<z.ZodNumber>;
32349
+ maxAccountsPerToolkit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
31876
32350
  requireExplicitSelection: z.ZodOptional<z.ZodBoolean>;
31877
32351
  }, "strip", z.ZodTypeAny, {
31878
32352
  enable?: boolean | undefined;
31879
- maxAccountsPerToolkit?: number | undefined;
32353
+ maxAccountsPerToolkit?: number | null | undefined;
31880
32354
  requireExplicitSelection?: boolean | undefined;
31881
32355
  }, {
31882
32356
  enable?: boolean | undefined;
31883
- maxAccountsPerToolkit?: number | undefined;
32357
+ maxAccountsPerToolkit?: number | null | undefined;
31884
32358
  requireExplicitSelection?: boolean | undefined;
31885
32359
  }>>>>;
31886
- preload: z.ZodOptional<z.ZodOptional<z.ZodObject<{
32360
+ preload: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
31887
32361
  tools: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodLiteral<"all">]>>;
31888
32362
  }, "strict", z.ZodTypeAny, {
31889
32363
  tools?: string[] | "all" | undefined;
31890
32364
  }, {
31891
32365
  tools?: string[] | "all" | undefined;
31892
- }>>>;
32366
+ }>>>>;
32367
+ search: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
32368
+ enable: z.ZodOptional<z.ZodBoolean>;
32369
+ }, "strict", z.ZodTypeAny, {
32370
+ enable?: boolean | undefined;
32371
+ }, {
32372
+ enable?: boolean | undefined;
32373
+ }>>>>;
32374
+ execute: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
32375
+ enableMultiExecute: z.ZodOptional<z.ZodBoolean>;
32376
+ }, "strict", z.ZodTypeAny, {
32377
+ enableMultiExecute?: boolean | undefined;
32378
+ }, {
32379
+ enableMultiExecute?: boolean | undefined;
32380
+ }>>>>;
32381
+ experimental: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
32382
+ permissions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
32383
+ default: z.ZodEnum<["allow_all", "ask_every_call", "ask_once_per_session"]>;
32384
+ overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["always_allow", "always_deny", "ask_once", "ask_always"]>>>;
32385
+ }, "strict", z.ZodTypeAny, {
32386
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32387
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32388
+ }, {
32389
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32390
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32391
+ }>>>;
32392
+ linkUrlOverwrite: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32393
+ fastMode: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
32394
+ submitFeedback: z.ZodOptional<z.ZodNullable<z.ZodObject<{
32395
+ enable: z.ZodBoolean;
32396
+ }, "strict", z.ZodTypeAny, {
32397
+ enable: boolean;
32398
+ }, {
32399
+ enable: boolean;
32400
+ }>>>;
32401
+ sessionConfigId: z.ZodOptional<z.ZodString>;
32402
+ }, "strict", z.ZodTypeAny, {
32403
+ sessionConfigId?: string | undefined;
32404
+ permissions?: {
32405
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32406
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32407
+ } | null | undefined;
32408
+ linkUrlOverwrite?: string | null | undefined;
32409
+ fastMode?: boolean | null | undefined;
32410
+ submitFeedback?: {
32411
+ enable: boolean;
32412
+ } | null | undefined;
32413
+ }, {
32414
+ sessionConfigId?: string | undefined;
32415
+ permissions?: {
32416
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32417
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32418
+ } | null | undefined;
32419
+ linkUrlOverwrite?: string | null | undefined;
32420
+ fastMode?: boolean | null | undefined;
32421
+ submitFeedback?: {
32422
+ enable: boolean;
32423
+ } | null | undefined;
32424
+ }>>>>;
32425
+ expectedConfigVersion: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodLiteral<false>]>>>;
31893
32426
  }, "strip", z.ZodTypeAny, {
31894
32427
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
31895
32428
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31896
32429
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31897
- } | undefined;
32430
+ } | null | undefined;
31898
32431
  tools?: Record<string, string[] | {
31899
32432
  enable: string[];
31900
32433
  } | {
@@ -31904,21 +32437,38 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31904
32437
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31905
32438
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31906
32439
  };
31907
- }> | undefined;
32440
+ }> | null | undefined;
31908
32441
  toolkits?: string[] | {
31909
32442
  disable: string[];
31910
32443
  } | {
31911
32444
  enable: string[];
31912
- } | undefined;
32445
+ } | null | undefined;
32446
+ search?: {
32447
+ enable?: boolean | undefined;
32448
+ } | null | undefined;
31913
32449
  preload?: {
31914
32450
  tools?: string[] | "all" | undefined;
32451
+ } | null | undefined;
32452
+ premiumUsage?: false | {
32453
+ tools?: Record<string, {
32454
+ enable: string[];
32455
+ } | {
32456
+ disable: string[];
32457
+ }> | undefined;
32458
+ toolkits?: {
32459
+ disable: string[];
32460
+ } | {
32461
+ enable: string[];
32462
+ } | undefined;
32463
+ returnPremiumCharge?: boolean | undefined;
31915
32464
  } | undefined;
31916
- authConfigs?: Record<string, string> | undefined;
31917
- connectedAccounts?: Record<string, string[]> | undefined;
32465
+ authConfigs?: Record<string, string> | null | undefined;
32466
+ connectedAccounts?: Record<string, string[]> | null | undefined;
31918
32467
  manageConnections?: boolean | {
31919
32468
  enable?: boolean | undefined;
31920
- callbackUrl?: string | undefined;
32469
+ callbackUrl?: string | null | undefined;
31921
32470
  waitForConnections?: boolean | undefined;
32471
+ enableConnectionRemoval?: boolean | null | undefined;
31922
32472
  } | null | undefined;
31923
32473
  sandbox?: {
31924
32474
  enable?: boolean | undefined;
@@ -31934,14 +32484,30 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31934
32484
  } | null | undefined;
31935
32485
  multiAccount?: {
31936
32486
  enable?: boolean | undefined;
31937
- maxAccountsPerToolkit?: number | undefined;
32487
+ maxAccountsPerToolkit?: number | null | undefined;
31938
32488
  requireExplicitSelection?: boolean | undefined;
31939
32489
  } | null | undefined;
32490
+ experimental?: {
32491
+ sessionConfigId?: string | undefined;
32492
+ permissions?: {
32493
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32494
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32495
+ } | null | undefined;
32496
+ linkUrlOverwrite?: string | null | undefined;
32497
+ fastMode?: boolean | null | undefined;
32498
+ submitFeedback?: {
32499
+ enable: boolean;
32500
+ } | null | undefined;
32501
+ } | null | undefined;
32502
+ execute?: {
32503
+ enableMultiExecute?: boolean | undefined;
32504
+ } | null | undefined;
32505
+ expectedConfigVersion?: number | false | undefined;
31940
32506
  }, {
31941
32507
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
31942
32508
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31943
32509
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31944
- } | undefined;
32510
+ } | null | undefined;
31945
32511
  tools?: Record<string, string[] | {
31946
32512
  enable: string[];
31947
32513
  } | {
@@ -31951,21 +32517,38 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31951
32517
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31952
32518
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31953
32519
  };
31954
- }> | undefined;
32520
+ }> | null | undefined;
31955
32521
  toolkits?: string[] | {
31956
32522
  disable: string[];
31957
32523
  } | {
31958
32524
  enable: string[];
31959
- } | undefined;
32525
+ } | null | undefined;
32526
+ search?: {
32527
+ enable?: boolean | undefined;
32528
+ } | null | undefined;
31960
32529
  preload?: {
31961
32530
  tools?: string[] | "all" | undefined;
32531
+ } | null | undefined;
32532
+ premiumUsage?: false | {
32533
+ tools?: Record<string, {
32534
+ enable: string[];
32535
+ } | {
32536
+ disable: string[];
32537
+ }> | undefined;
32538
+ toolkits?: {
32539
+ disable: string[];
32540
+ } | {
32541
+ enable: string[];
32542
+ } | undefined;
32543
+ returnPremiumCharge?: boolean | undefined;
31962
32544
  } | undefined;
31963
- authConfigs?: Record<string, string> | undefined;
31964
- connectedAccounts?: Record<string, string | string[]> | undefined;
32545
+ authConfigs?: Record<string, string> | null | undefined;
32546
+ connectedAccounts?: Record<string, string | string[]> | null | undefined;
31965
32547
  manageConnections?: boolean | {
31966
32548
  enable?: boolean | undefined;
31967
- callbackUrl?: string | undefined;
32549
+ callbackUrl?: string | null | undefined;
31968
32550
  waitForConnections?: boolean | undefined;
32551
+ enableConnectionRemoval?: boolean | null | undefined;
31969
32552
  } | null | undefined;
31970
32553
  sandbox?: {
31971
32554
  enable?: boolean | undefined;
@@ -31981,14 +32564,30 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31981
32564
  } | null | undefined;
31982
32565
  multiAccount?: {
31983
32566
  enable?: boolean | undefined;
31984
- maxAccountsPerToolkit?: number | undefined;
32567
+ maxAccountsPerToolkit?: number | null | undefined;
31985
32568
  requireExplicitSelection?: boolean | undefined;
31986
32569
  } | null | undefined;
32570
+ experimental?: {
32571
+ sessionConfigId?: string | undefined;
32572
+ permissions?: {
32573
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32574
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32575
+ } | null | undefined;
32576
+ linkUrlOverwrite?: string | null | undefined;
32577
+ fastMode?: boolean | null | undefined;
32578
+ submitFeedback?: {
32579
+ enable: boolean;
32580
+ } | null | undefined;
32581
+ } | null | undefined;
32582
+ execute?: {
32583
+ enableMultiExecute?: boolean | undefined;
32584
+ } | null | undefined;
32585
+ expectedConfigVersion?: number | false | undefined;
31987
32586
  }>, {
31988
32587
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
31989
32588
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31990
32589
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31991
- } | undefined;
32590
+ } | null | undefined;
31992
32591
  tools?: Record<string, string[] | {
31993
32592
  enable: string[];
31994
32593
  } | {
@@ -31998,21 +32597,38 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
31998
32597
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
31999
32598
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
32000
32599
  };
32001
- }> | undefined;
32600
+ }> | null | undefined;
32002
32601
  toolkits?: string[] | {
32003
32602
  disable: string[];
32004
32603
  } | {
32005
32604
  enable: string[];
32006
- } | undefined;
32605
+ } | null | undefined;
32606
+ search?: {
32607
+ enable?: boolean | undefined;
32608
+ } | null | undefined;
32007
32609
  preload?: {
32008
32610
  tools?: string[] | "all" | undefined;
32611
+ } | null | undefined;
32612
+ premiumUsage?: false | {
32613
+ tools?: Record<string, {
32614
+ enable: string[];
32615
+ } | {
32616
+ disable: string[];
32617
+ }> | undefined;
32618
+ toolkits?: {
32619
+ disable: string[];
32620
+ } | {
32621
+ enable: string[];
32622
+ } | undefined;
32623
+ returnPremiumCharge?: boolean | undefined;
32009
32624
  } | undefined;
32010
- authConfigs?: Record<string, string> | undefined;
32011
- connectedAccounts?: Record<string, string[]> | undefined;
32625
+ authConfigs?: Record<string, string> | null | undefined;
32626
+ connectedAccounts?: Record<string, string[]> | null | undefined;
32012
32627
  manageConnections?: boolean | {
32013
32628
  enable?: boolean | undefined;
32014
- callbackUrl?: string | undefined;
32629
+ callbackUrl?: string | null | undefined;
32015
32630
  waitForConnections?: boolean | undefined;
32631
+ enableConnectionRemoval?: boolean | null | undefined;
32016
32632
  } | null | undefined;
32017
32633
  sandbox?: {
32018
32634
  enable?: boolean | undefined;
@@ -32028,14 +32644,30 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
32028
32644
  } | null | undefined;
32029
32645
  multiAccount?: {
32030
32646
  enable?: boolean | undefined;
32031
- maxAccountsPerToolkit?: number | undefined;
32647
+ maxAccountsPerToolkit?: number | null | undefined;
32032
32648
  requireExplicitSelection?: boolean | undefined;
32033
32649
  } | null | undefined;
32650
+ experimental?: {
32651
+ sessionConfigId?: string | undefined;
32652
+ permissions?: {
32653
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32654
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32655
+ } | null | undefined;
32656
+ linkUrlOverwrite?: string | null | undefined;
32657
+ fastMode?: boolean | null | undefined;
32658
+ submitFeedback?: {
32659
+ enable: boolean;
32660
+ } | null | undefined;
32661
+ } | null | undefined;
32662
+ execute?: {
32663
+ enableMultiExecute?: boolean | undefined;
32664
+ } | null | undefined;
32665
+ expectedConfigVersion?: number | false | undefined;
32034
32666
  }, {
32035
32667
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
32036
32668
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
32037
32669
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
32038
- } | undefined;
32670
+ } | null | undefined;
32039
32671
  tools?: Record<string, string[] | {
32040
32672
  enable: string[];
32041
32673
  } | {
@@ -32045,21 +32677,38 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
32045
32677
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
32046
32678
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
32047
32679
  };
32048
- }> | undefined;
32680
+ }> | null | undefined;
32049
32681
  toolkits?: string[] | {
32050
32682
  disable: string[];
32051
32683
  } | {
32052
32684
  enable: string[];
32053
- } | undefined;
32685
+ } | null | undefined;
32686
+ search?: {
32687
+ enable?: boolean | undefined;
32688
+ } | null | undefined;
32054
32689
  preload?: {
32055
32690
  tools?: string[] | "all" | undefined;
32691
+ } | null | undefined;
32692
+ premiumUsage?: false | {
32693
+ tools?: Record<string, {
32694
+ enable: string[];
32695
+ } | {
32696
+ disable: string[];
32697
+ }> | undefined;
32698
+ toolkits?: {
32699
+ disable: string[];
32700
+ } | {
32701
+ enable: string[];
32702
+ } | undefined;
32703
+ returnPremiumCharge?: boolean | undefined;
32056
32704
  } | undefined;
32057
- authConfigs?: Record<string, string> | undefined;
32058
- connectedAccounts?: Record<string, string | string[]> | undefined;
32705
+ authConfigs?: Record<string, string> | null | undefined;
32706
+ connectedAccounts?: Record<string, string | string[]> | null | undefined;
32059
32707
  manageConnections?: boolean | {
32060
32708
  enable?: boolean | undefined;
32061
- callbackUrl?: string | undefined;
32709
+ callbackUrl?: string | null | undefined;
32062
32710
  waitForConnections?: boolean | undefined;
32711
+ enableConnectionRemoval?: boolean | null | undefined;
32063
32712
  } | null | undefined;
32064
32713
  sandbox?: {
32065
32714
  enable?: boolean | undefined;
@@ -32075,11 +32724,49 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
32075
32724
  } | null | undefined;
32076
32725
  multiAccount?: {
32077
32726
  enable?: boolean | undefined;
32078
- maxAccountsPerToolkit?: number | undefined;
32727
+ maxAccountsPerToolkit?: number | null | undefined;
32079
32728
  requireExplicitSelection?: boolean | undefined;
32080
32729
  } | null | undefined;
32730
+ experimental?: {
32731
+ sessionConfigId?: string | undefined;
32732
+ permissions?: {
32733
+ default: "allow_all" | "ask_every_call" | "ask_once_per_session";
32734
+ overrides?: Record<string, "always_allow" | "always_deny" | "ask_once" | "ask_always"> | undefined;
32735
+ } | null | undefined;
32736
+ linkUrlOverwrite?: string | null | undefined;
32737
+ fastMode?: boolean | null | undefined;
32738
+ submitFeedback?: {
32739
+ enable: boolean;
32740
+ } | null | undefined;
32741
+ } | null | undefined;
32742
+ execute?: {
32743
+ enableMultiExecute?: boolean | undefined;
32744
+ } | null | undefined;
32745
+ expectedConfigVersion?: number | false | undefined;
32081
32746
  }>;
32082
- type ToolRouterUpdateSessionConfig = z.infer<typeof ToolRouterUpdateSessionConfigSchema>;
32747
+ /**
32748
+ * Options for `session.update()`. `experimental.sessionConfigId` applies a
32749
+ * saved Session config and cannot be combined with `toolkits`, `tools` or
32750
+ * `tags` (including `null`).
32751
+ */
32752
+ type ToolRouterUpdateSessionConfig = InlineAccessUpdateSessionConfig | SavedConfigUpdateSessionConfig;
32753
+ type ParsedUpdateSessionConfig = z.infer<typeof ToolRouterUpdateSessionConfigSchema>;
32754
+ type ParsedUpdateSessionExperimental = NonNullable<ParsedUpdateSessionConfig['experimental']>;
32755
+ /** Update input that sets access inline and applies no saved Session config. */
32756
+ type InlineAccessUpdateSessionConfig = Omit<ParsedUpdateSessionConfig, 'experimental'> & {
32757
+ experimental?: (Omit<ParsedUpdateSessionExperimental, 'sessionConfigId'> & {
32758
+ sessionConfigId?: never;
32759
+ }) | null;
32760
+ };
32761
+ /** Update input that applies a saved Session config. */
32762
+ type SavedConfigUpdateSessionConfig = Omit<ParsedUpdateSessionConfig, 'toolkits' | 'tools' | 'tags' | 'experimental'> & {
32763
+ toolkits?: never;
32764
+ tools?: never;
32765
+ tags?: never;
32766
+ experimental: Omit<ParsedUpdateSessionExperimental, 'sessionConfigId'> & {
32767
+ sessionConfigId: string;
32768
+ };
32769
+ };
32083
32770
  type ToolRouterSessionUpdateFn = (config: ToolRouterUpdateSessionConfig) => Promise<ToolRouterSessionConfig>;
32084
32771
  declare const ToolRouterSessionDeleteResponseSchema: z.ZodObject<{
32085
32772
  sessionId: z.ZodString;
@@ -32092,6 +32779,45 @@ declare const ToolRouterSessionDeleteResponseSchema: z.ZodObject<{
32092
32779
  deleted: true;
32093
32780
  }>;
32094
32781
  type ToolRouterSessionDeleteResponse = z.infer<typeof ToolRouterSessionDeleteResponseSchema>;
32782
+ /**
32783
+ * Options for `session.listConfigHistory()`.
32784
+ */
32785
+ declare const ToolRouterSessionListConfigHistoryOptionsSchema: z.ZodObject<{
32786
+ /** Cursor from a previous response's `nextCursor`. */
32787
+ cursor: z.ZodOptional<z.ZodString>;
32788
+ /** Number of items per page, max allowed is 100. */
32789
+ limit: z.ZodOptional<z.ZodNumber>;
32790
+ }, "strip", z.ZodTypeAny, {
32791
+ limit?: number | undefined;
32792
+ cursor?: string | undefined;
32793
+ }, {
32794
+ limit?: number | undefined;
32795
+ cursor?: string | undefined;
32796
+ }>;
32797
+ type ToolRouterSessionListConfigHistoryOptions = z.infer<typeof ToolRouterSessionListConfigHistoryOptionsSchema>;
32798
+ /**
32799
+ * The session configuration at one version, as stored by the API. This is
32800
+ * the wire shape (snake_case), typed from the generated client.
32801
+ */
32802
+ type ToolRouterSessionConfigHistoryConfig = SessionConfigHistoryResponse.Item.Config;
32803
+ type ToolRouterSessionConfigHistoryItem = {
32804
+ /** The config version this entry represents. */
32805
+ version: number;
32806
+ /** ISO timestamp — for archived rows, when the version was superseded by an update. */
32807
+ createdAt: string;
32808
+ /** True only for the live (current) config, present on the first page. */
32809
+ isCurrent: boolean;
32810
+ /** The session configuration at this version. */
32811
+ config: ToolRouterSessionConfigHistoryConfig;
32812
+ };
32813
+ type ToolRouterSessionListConfigHistoryResponse = {
32814
+ items: ToolRouterSessionConfigHistoryItem[];
32815
+ nextCursor: string | null;
32816
+ totalPages: number;
32817
+ currentPage: number;
32818
+ totalItems: number;
32819
+ };
32820
+ type ToolRouterSessionListConfigHistoryFn = (options?: ToolRouterSessionListConfigHistoryOptions, requestOptions?: ComposioRequestOptions) => Promise<ToolRouterSessionListConfigHistoryResponse>;
32095
32821
  type ToolRouterSessionDeleteFn = (requestOptions?: ComposioRequestOptions) => Promise<ToolRouterSessionDeleteResponse>;
32096
32822
  declare const ToolRouterSessionEnsureConnectedOptionsSchema: z.ZodObject<{
32097
32823
  callbackUrl: z.ZodOptional<z.ZodString>;
@@ -32171,9 +32897,9 @@ interface Session<TToolCollection, TTool, TProvider extends BaseComposioProvider
32171
32897
  sessionId: string;
32172
32898
  mcp: ToolRouterMCPServerConfig;
32173
32899
  /**
32174
- * Server-side session configuration (toolkit/tool allowlists, tags, preload,
32175
- * sandbox, manage_connections) as returned by the API. Refreshed in place by
32176
- * `update()`.
32900
+ * The session's current configuration (policy snapshot and runtime
32901
+ * settings). Refreshed in place by `update()`. For saved, reusable Session
32902
+ * configs, see `composio.sessionConfigs`.
32177
32903
  */
32178
32904
  config: ToolRouterSessionConfig;
32179
32905
  /** Stored preload configuration for this session. */
@@ -32207,6 +32933,8 @@ interface Session<TToolCollection, TTool, TProvider extends BaseComposioProvider
32207
32933
  update: ToolRouterSessionUpdateFn;
32208
32934
  /** Delete the session. Deleted sessions are no longer retrievable or executable. */
32209
32935
  delete: ToolRouterSessionDeleteFn;
32936
+ /** Page through the session's configuration history (newest first). */
32937
+ listConfigHistory: ToolRouterSessionListConfigHistoryFn;
32210
32938
  /** Proxy an API call through Composio's auth layer using the session's connected account */
32211
32939
  proxyExecute: ToolRouterSessionProxyExecuteFn;
32212
32940
  /** List custom tools registered in this session, with their final slugs and schemas */
@@ -32423,4 +33151,4 @@ type CustomToolResponse = SessionCreateResponse.Experimental.CustomTool;
32423
33151
  /** Custom toolkit as returned in the session create response (has prefixed slugs + original_slugs). */
32424
33152
  type CustomToolkitResponse = SessionCreateResponse.Experimental.CustomToolkit;
32425
33153
  //#endregion
32426
- export { ToolRouterSessionEnsureConnectedResult as $, Tool as $i, GenerateURLResponseSchema as $n, CustomOauth1ConnectionData as $r, ConnectedAccountAuthConfig as $t, SessionProxyExecuteParams as A, Oauth2InitiatingConnectionDataSchema as Ai, CreateConnectedAccountResponseSchema as An, McpServerCreateResponse as Ar, ToolkitConnectionsDetailsSchema as At, ToolRouterCreateSessionConfigSchema as B, SessionMetaToolOptions as Bi, ComposioGenerateURLParamsSchema as Bn, ExecuteToolFnOptions as Br, ToolRouterSessionFilesMountDownloadOptions as Bt, MCPServerType as C, ToolkitVersions as Ca, Oauth2FailedConnectionData as Ci, CreateConnectedAccountLinkResponse as Cn, MCPToolkitConfigsArraySchema as Cr, ToolRouterToolsParam as Ct, Session as D, Oauth2InitiatedConnectionData as Di, CreateConnectedAccountParams as Dn, McpListResponseSchema as Dr, ToolkitConnectionState as Dt, SandboxSizeSchema as E, Oauth2InactiveConnectionDataSchema as Ei, CreateConnectedAccountOptionsSchema as En, McpListResponse as Er, ToolRouterUpdateSessionConfigSchema as Et, ToolRouterConfigTags as F, BeforeFileUploadSource as Fi, UpdateConnectedAccountParamsSchema as Fn, McpUpdateResponseSchema as Fr, FileListResponseSchema as Ft, ToolRouterSandboxConfigSchema as G, beforeExecuteMetaModifier as Gi, ComposioMcpUpdateResponseSchema as Gn, BaseConnectionFields as Gr, ToolRouterSessionFilesMountUploadOptionsSchema as Gt, ToolRouterMCPServerConfigSchema as H, TransformToolSchemaModifier as Hi, ComposioMcpDeleteResponseSchema as Hn, Provider as Hr, ToolRouterSessionFilesMountListOptions as Ht, ToolRouterConfigTagsSchema as I, ExecuteToolModifiers as Ii, BaseAgenticProvider as In, McpUrlResponse as Ir, RemoteFileData as It, ToolRouterSessionDeleteResponse as J, CustomAuthParams as Ji, CustomCreateResponseSchema as Jn, ConnectionDataSchema as Jr, ConnectionRequestState as Jt, ToolRouterSessionConfig as K, beforeExecuteModifier as Ki, ConnectionStatus as Kn, BillcomAuthConnectionDataSchema as Kr, ComposioRequestOptions as Kt, ToolRouterConfigTools as L, MetaToolArguments as Li, BaseComposioProvider as Ln, McpUrlResponseCamelCase as Lr, RemoteFileDataSchema as Lt, SessionWithoutMcp as M, Oauth2RevokedConnectionDataSchema as Mi, UpdateConnectedAccountAclParams as Mn, McpServerUrlInfo as Mr, FileDeleteResponse as Mt, ToolRouterAuthorizeFn as N, RedirectableAuthSchemeSchema as Ni, UpdateConnectedAccountAclParamsSchema as Nn, McpToolkitConnectionStatus as Nr, FileDeleteResponseSchema as Nt, SessionExperimental as O, Oauth2InitiatedConnectionDataSchema as Oi, CreateConnectedAccountParamsSchema as On, McpRetrieveResponse as Or, ToolkitConnectionStateSchema as Ot, ToolRouterConfigManageConnectionsSchema as P, AgenticToolOptions as Pi, UpdateConnectedAccountParams as Pn, McpUpdateResponse as Pr, FileListResponse as Pt, ToolRouterSessionEnsureConnectedOptionsSchema as Q, SchemaModifierOptions as Qi, GenerateURLResponse$1 as Qn, CustomConnectionDataSchema as Qr, ConnectedAccountAclConfigSchema as Qt, ToolRouterConfigToolsSchema as R, ProviderOptions as Ri, BaseNonAgenticProvider as Rn, McpUserConnectionStatus as Rr, ToolRouterSessionFilesMountDeleteOptions as Rt, SessionContext as S, ToolkitVersionSchema as Sa, Oauth2ExpiredConnectionDataSchema as Si, CreateConnectedAccountLinkOptionsSchema as Sn, MCPToolkitConfigSchema as Sr, ToolRouterToolsFn as St, SandboxSize as T, Oauth2InactiveConnectionData as Ti, CreateConnectedAccountOptions as Tn, McpDeleteResponseSchema as Tr, ToolRouterUpdateSessionConfig as Tt, ToolRouterManageConnectionsConfigSchema as U, afterExecuteMetaModifier as Ui, ComposioMcpListResponseSchema as Un, ToolCallExecutionTarget as Ur, ToolRouterSessionFilesMountListOptionsSchema as Ut, ToolRouterMCPServerConfig as V, ToolOptions as Vi, ComposioGenerateURLResponseSchema as Vn, GlobalExecuteToolFn as Vr, ToolRouterSessionFilesMountDownloadOptionsSchema as Vt, ToolRouterSandboxConfig as W, afterExecuteModifier as Wi, ComposioMcpRetrieveResponseSchema as Wn, ToolCallSession as Wr, ToolRouterSessionFilesMountUploadOptions as Wt, ToolRouterSessionEnsureConnectedFn as X, JSONSchemaProperty as Xi, GenerateURLParams as Xn, ConnectionStatuses as Xr, ConnectedAccountAclConfigResponse as Xt, ToolRouterSessionDeleteResponseSchema as Y, CustomAuthParamsSchema as Yi, CustomCreateResponseValidated as Yn, ConnectionStatusEnum as Yr, ConnectedAccountAclConfig as Yt, ToolRouterSessionEnsureConnectedOptions as Z, JSONSchemaPropertySchema as Zi, GenerateURLParamsSchema as Zn, CustomConnectionData as Zr, ConnectedAccountAclConfigResponseSchema as Zt, CustomToolsMapEntry as _, ToolkitLatestVersionSchema as _a, Oauth2ActiveConnectionData as _i, ConnectedAccountStatuses as _n, MCPServerUpdateParams as _r, ToolRouterToolkitsEnabledConfigSchema as _t, CreateCustomToolkitParams as a, ToolExecuteResponseSchema as aa, Oauth1ConnectionData as ai, ConnectedAccountListParams as an, MCPGenerateURLParamsSchema as ar, ToolRouterSessionPreloadConfig as at, RegisteredCustomTool as b, ToolkitVersionParam as ba, Oauth2ConnectionDataSchema as bi, ConnectedAccountTypes as bn, MCPSingleAppServerSchema as br, ToolRouterToolkitsOptionsSchema as bt, CustomToolExecuteFn as c, ToolListParamsSchema as ca, Oauth1ExpiredConnectionDataSchema as ci, ConnectedAccountListResponseItem as cn, MCPInstanceParams as cr, ToolRouterSessionSearchFn as ct, CustomToolWireDefinition as d, ToolProxyParams as da, Oauth1InactiveConnectionData as di, ConnectedAccountRefreshOptionsSchema as dn, MCPServer as dr, ToolRouterSessionUpdateFn as dt, ToolExecuteMetaParams as ea, CustomOauth1ConnectionDataSchema as ei, ConnectedAccountAuthConfigSchema as en, GenerateURLResponseValidated as er, ToolRouterSessionExecuteFn as et, CustomToolkit as f, ToolProxyParamsSchema as fa, Oauth1InactiveConnectionDataSchema as fi, ConnectedAccountRetrieveResponse as fn, MCPServerCreateResponse as fr, ToolRouterSessionWarning as ft, CustomToolsMap as g, ToolkitLatestVersion as ga, Oauth1InitiatingConnectionDataSchema as gi, ConnectedAccountStatusSchema as gn, MCPServerSchema as gr, ToolRouterToolkitsDisabledConfigSchema as gt, CustomToolkitWireDefinition as h, Toolkit as ha, Oauth1InitiatingConnectionData as hi, ConnectedAccountStatusEnum as hn, MCPServerListResponseSchema as hr, ToolRouterTagsParamSchema as ht, CreateCustomToolkitBaseSchema as i, ToolExecuteResponse as ia, Oauth1ActiveConnectionDataSchema as ii, ConnectedAccountExperimentalSchema as in, MCPGenerateURLParams as ir, ToolRouterSessionMetadata as it, SessionProxyExecuteParamsSchema as j, Oauth2RevokedConnectionData as ji, DefaultCreateConnectedAccountParamsSchema as jn, McpServerGetResponse as jr, RemoteFile as jt, SessionPreset as k, Oauth2InitiatingConnectionData as ki, CreateConnectedAccountResponse as kn, McpRetrieveResponseSchema as kr, ToolkitConnectionsDetails as kt, CustomToolResponse as l, ToolListResponse as la, Oauth1FailedConnectionData as li, ConnectedAccountListResponseSchema as ln, MCPMultiAppServer as lr, ToolRouterSessionSearchResponse as lt, CustomToolkitResponse as m, ToolSchema as ma, Oauth1InitiatedConnectionDataSchema as mi, ConnectedAccountStatus as mn, MCPServerListResponse as mr, ToolRouterTagsEnableDisableSchema as mt, CreateCustomToolBaseSchema as n, ToolExecuteParams as na, CustomOauth2ConnectionDataSchema as ni, ConnectedAccountExperimentalResponse as nn, MCPAuthOptionsSchema as nr, ToolRouterSessionExecuteResponse as nt, CustomTool as o, ToolList as oa, Oauth1ConnectionDataSchema as oi, ConnectedAccountListParamsSchema as on, MCPGetServerParams as or, ToolRouterSessionProxyExecuteFn as ot, CustomToolkitDefinition as p, ToolRetrievalOptions as pa, Oauth1InitiatedConnectionData as pi, ConnectedAccountRetrieveResponseSchema as pn, MCPServerCreateResponseSchema as pr, ToolRouterSessionWorkbenchConfig as pt, ToolRouterSessionDeleteFn as q, beforeFileUploadModifier as qi, CustomCreateResponse$1 as qn, ConnectionData as qr, ConnectionRequest as qt, CreateCustomToolParams as r, ToolExecuteParamsSchema as ra, Oauth1ActiveConnectionData as ri, ConnectedAccountExperimentalResponseSchema as rn, MCPCreateMethodResponse as rr, ToolRouterSessionExecuteResponseSchema as rt, CustomToolDefinition as s, ToolListParams as sa, Oauth1ExpiredConnectionData as si, ConnectedAccountListResponse as sn, MCPGetServerParamsSchema as sr, ToolRouterSessionProxyExecuteResponse as st, AnyZodSchema as t, ToolExecuteMetaParamsSchema as ta, CustomOauth2ConnectionData as ti, ConnectedAccountExperimental as tn, MCPAuthOptions as tr, ToolRouterSessionExecuteOptions as tt, CustomToolSlugSchema as u, ToolListResponseSchema as ua, Oauth1FailedConnectionDataSchema as ui, ConnectedAccountRefreshOptions as un, MCPMultiAppServerSchema as ur, ToolRouterSessionSearchResponseSchema as ut, InferZodSchema as v, ToolkitSchema as va, Oauth2ActiveConnectionDataSchema as vi, ConnectedAccountType as vn, MCPServerUpdateParamsSchema as vr, ToolRouterToolkitsFn as vt, MCPServerTypeSchema as w, ToolkitVersionsSchema as wa, Oauth2FailedConnectionDataSchema as wi, CreateConnectedAccountLinkResponseSchema as wn, McpDeleteResponse as wr, ToolRouterToolsParamSchema as wt, RegisteredCustomToolkit as x, ToolkitVersionParamSchema as xa, Oauth2ExpiredConnectionData as xi, CreateConnectedAccountLinkOptions as xn, MCPToolkitConfig as xr, ToolRouterToolkitsParamSchema as xt, InlineCustomToolsWirePayload as y, ToolkitVersion as ya, Oauth2ConnectionData as yi, ConnectedAccountTypeSchema as yn, MCPSingleAppServer as yr, ToolRouterToolkitsOptions as yt, ToolRouterCreateSessionConfig as z, SessionExecuteMetaModifiers as zi, ComposioCustomCreateResponseSchema as zn, ExecuteToolFn as zr, ToolRouterSessionFilesMountDeleteOptionsSchema as zt };
33154
+ export { ToolRouterSessionDeleteResponseSchema as $, RedirectableAuthSchemeSchema as $i, UpdateConnectedAccountAclParamsSchema as $n, McpToolkitConnectionStatus as $r, ToolRouterSessionFilesMountDownloadOptionsSchema as $t, SessionProxyExecuteParams as A, ToolListResponseSchema as Aa, Oauth1FailedConnectionDataSchema as Ai, ConnectedAccountRevokeResponse as An, MCPMultiAppServerSchema as Ar, ToolRouterToolsFn as At, ToolRouterCreateSessionConfigSchema as B, ToolkitVersionParam as Ba, Oauth2ConnectionDataSchema as Bi, ConnectedAccountTypes as Bn, MCPSingleAppServerSchema as Br, ToolkitConnectionStateSchema as Bt, MCPServerType as C, ToolExecuteParamsSchema as Ca, Oauth1ActiveConnectionData as Ci, ConnectedAccountListResponse as Cn, MCPCreateMethodResponse as Cr, ToolRouterTagsParamSchema as Ct, Session as D, ToolListParams as Da, Oauth1ExpiredConnectionData as Di, ConnectedAccountRefreshOptionsSchema as Dn, MCPGetServerParamsSchema as Dr, ToolRouterToolkitsOptions as Dt, SandboxSizeSchema as E, ToolList as Ea, Oauth1ConnectionDataSchema as Ei, ConnectedAccountRefreshOptions as En, MCPGetServerParams as Er, ToolRouterToolkitsFn as Et, ToolRouterConfigTags as F, Toolkit as Fa, Oauth1InitiatingConnectionData as Fi, ConnectedAccountStatusEnum as Fn, MCPServerListResponseSchema as Fr, ToolRouterUpdateManageConnectionsConfig as Ft, ToolRouterPremiumUsageSchema as G, Oauth2InactiveConnectionData as Gi, CreateConnectedAccountOptions as Gn, McpDeleteResponseSchema as Gr, FileDeleteResponseSchema as Gt, ToolRouterMCPServerConfigSchema as H, ToolkitVersionSchema as Ha, Oauth2ExpiredConnectionDataSchema as Hi, CreateConnectedAccountLinkOptionsSchema as Hn, MCPToolkitConfigSchema as Hr, ToolkitConnectionsDetailsSchema as Ht, ToolRouterConfigTagsSchema as I, ToolkitLatestVersion as Ia, Oauth1InitiatingConnectionDataSchema as Ii, ConnectedAccountStatusSchema as In, MCPServerSchema as Ir, ToolRouterUpdateManageConnectionsSchema as It, ToolRouterSessionConfig as J, Oauth2InitiatedConnectionDataSchema as Ji, CreateConnectedAccountParamsSchema as Jn, McpRetrieveResponse as Jr, RemoteFileData as Jt, ToolRouterSandboxConfig as K, Oauth2InactiveConnectionDataSchema as Ki, CreateConnectedAccountOptionsSchema as Kn, McpListResponse as Kr, FileListResponse as Kt, ToolRouterConfigTools as L, ToolkitLatestVersionSchema as La, Oauth2ActiveConnectionData as Li, ConnectedAccountStatuses as Ln, MCPServerUpdateParams as Lr, ToolRouterUpdateSessionConfig as Lt, SessionWithoutMcp as M, ToolProxyParamsSchema as Ma, Oauth1InactiveConnectionDataSchema as Mi, ConnectedAccountRevokedToken as Mn, MCPServerCreateResponse as Mr, ToolRouterToolsParamSchema as Mt, ToolRouterAuthorizeFn as N, ToolRetrievalOptions as Na, Oauth1InitiatedConnectionData as Ni, ConnectedAccountRevokedTokenSchema as Nn, MCPServerCreateResponseSchema as Nr, ToolRouterUpdateExperimentalConfig as Nt, SessionExperimental as O, ToolListParamsSchema as Oa, Oauth1ExpiredConnectionDataSchema as Oi, ConnectedAccountRetrieveResponse as On, MCPInstanceParams as Or, ToolRouterToolkitsOptionsSchema as Ot, ToolRouterConfigManageConnectionsSchema as P, ToolSchema as Pa, Oauth1InitiatedConnectionDataSchema as Pi, ConnectedAccountStatus as Pn, MCPServerListResponse as Pr, ToolRouterUpdateExperimentalSchema as Pt, ToolRouterSessionDeleteResponse as Q, Oauth2RevokedConnectionDataSchema as Qi, UpdateConnectedAccountAclParams as Qn, McpServerUrlInfo as Qr, ToolRouterSessionFilesMountDownloadOptions as Qt, ToolRouterConfigToolsSchema as R, ToolkitSchema as Ra, Oauth2ActiveConnectionDataSchema as Ri, ConnectedAccountType as Rn, MCPServerUpdateParamsSchema as Rr, ToolRouterUpdateSessionConfigSchema as Rt, SessionContext as S, ToolExecuteParams as Sa, CustomOauth2ConnectionDataSchema as Si, ConnectedAccountListParamsSchema as Sn, MCPAuthOptionsSchema as Sr, ToolRouterTagsEnableDisableSchema as St, SandboxSize as T, ToolExecuteResponseSchema as Ta, Oauth1ConnectionData as Ti, ConnectedAccountListResponseSchema as Tn, MCPGenerateURLParamsSchema as Tr, ToolRouterToolkitsEnabledConfigSchema as Tt, ToolRouterManageConnectionsConfigSchema as U, ToolkitVersions as Ua, Oauth2FailedConnectionData as Ui, CreateConnectedAccountLinkResponse as Un, MCPToolkitConfigsArraySchema as Ur, RemoteFile as Ut, ToolRouterMCPServerConfig as V, ToolkitVersionParamSchema as Va, Oauth2ExpiredConnectionData as Vi, CreateConnectedAccountLinkOptions as Vn, MCPToolkitConfig as Vr, ToolkitConnectionsDetails as Vt, ToolRouterPremiumUsage as W, ToolkitVersionsSchema as Wa, Oauth2FailedConnectionDataSchema as Wi, CreateConnectedAccountLinkResponseSchema as Wn, McpDeleteResponse as Wr, FileDeleteResponse as Wt, ToolRouterSessionConfigHistoryItem as X, Oauth2InitiatingConnectionDataSchema as Xi, CreateConnectedAccountResponseSchema as Xn, McpServerCreateResponse as Xr, ToolRouterSessionFilesMountDeleteOptions as Xt, ToolRouterSessionConfigHistoryConfig as Y, Oauth2InitiatingConnectionData as Yi, CreateConnectedAccountResponse as Yn, McpRetrieveResponseSchema as Yr, RemoteFileDataSchema as Yt, ToolRouterSessionDeleteFn as Z, Oauth2RevokedConnectionData as Zi, DefaultCreateConnectedAccountParamsSchema as Zn, McpServerGetResponse as Zr, ToolRouterSessionFilesMountDeleteOptionsSchema as Zt, CustomToolsMapEntry as _, JSONSchemaPropertySchema as _a, CustomConnectionData as _i, ConnectedAccountExperimental as _n, GenerateURLParamsSchema as _r, ToolRouterSessionSearchResponse as _t, CreateCustomToolkitParams as a, SessionExecuteMetaModifiers as aa, ExecuteToolFn as ai, ConnectionRequest as an, ComposioCustomCreateResponseSchema as ar, ToolRouterSessionExecuteOptions as at, RegisteredCustomTool as b, ToolExecuteMetaParams as ba, CustomOauth1ConnectionDataSchema as bi, ConnectedAccountExperimentalSchema as bn, GenerateURLResponseValidated as br, ToolRouterSessionWarning as bt, CustomToolExecuteFn as c, TransformToolSchemaModifier as ca, Provider as ci, ConnectedAccountAclConfigResponse as cn, ComposioMcpDeleteResponseSchema as cr, ToolRouterSessionListConfigHistoryFn as ct, CustomToolWireDefinition as d, beforeExecuteMetaModifier as da, BaseConnectionFields as di, ConnectedAccountAuthConfig as dn, ComposioMcpUpdateResponseSchema as dr, ToolRouterSessionListConfigHistoryResponse as dt, AgenticToolOptions as ea, McpUpdateResponse as ei, ToolRouterSessionFilesMountListOptions as en, UpdateConnectedAccountParams as er, ToolRouterSessionEnsureConnectedFn as et, CustomToolkit as f, beforeExecuteModifier as fa, BillcomAuthConnectionDataSchema as fi, ConnectedAccountAuthConfigSchema as fn, ConnectionStatus as fr, ToolRouterSessionMetadata as ft, CustomToolsMap as g, JSONSchemaProperty as ga, ConnectionStatuses as gi, ConnectedAccountCompleteAuthResponseSchema as gn, GenerateURLParams as gr, ToolRouterSessionSearchFn as gt, CustomToolkitWireDefinition as h, CustomAuthParamsSchema as ha, ConnectionStatusEnum as hi, ConnectedAccountCompleteAuthResponse as hn, CustomCreateResponseValidated as hr, ToolRouterSessionProxyExecuteResponse as ht, CreateCustomToolkitBaseSchema as i, ProviderOptions as ia, McpUserConnectionStatus as ii, ComposioRequestOptions as in, BaseNonAgenticProvider as ir, ToolRouterSessionExecuteFn as it, SessionProxyExecuteParamsSchema as j, ToolProxyParams as ja, Oauth1InactiveConnectionData as ji, ConnectedAccountRevokeResponseSchema as jn, MCPServer as jr, ToolRouterToolsParam as jt, SessionPreset as k, ToolListResponse as ka, Oauth1FailedConnectionData as ki, ConnectedAccountRetrieveResponseSchema as kn, MCPMultiAppServer as kr, ToolRouterToolkitsParamSchema as kt, CustomToolResponse as l, afterExecuteMetaModifier as la, ToolCallExecutionTarget as li, ConnectedAccountAclConfigResponseSchema as ln, ComposioMcpListResponseSchema as lr, ToolRouterSessionListConfigHistoryOptions as lt, CustomToolkitResponse as m, CustomAuthParams as ma, ConnectionDataSchema as mi, ConnectedAccountCompleteAuthParamsSchema as mn, CustomCreateResponseSchema as mr, ToolRouterSessionProxyExecuteFn as mt, CreateCustomToolBaseSchema as n, ExecuteToolModifiers as na, McpUrlResponse as ni, ToolRouterSessionFilesMountUploadOptions as nn, BaseAgenticProvider as nr, ToolRouterSessionEnsureConnectedOptionsSchema as nt, CustomTool as o, SessionMetaToolOptions as oa, ExecuteToolFnOptions as oi, ConnectionRequestState as on, ComposioGenerateURLParamsSchema as or, ToolRouterSessionExecuteResponse as ot, CustomToolkitDefinition as p, beforeFileUploadModifier as pa, ConnectionData as pi, ConnectedAccountCompleteAuthParams as pn, CustomCreateResponse$1 as pr, ToolRouterSessionPreloadConfig as pt, ToolRouterSandboxConfigSchema as q, Oauth2InitiatedConnectionData as qi, CreateConnectedAccountParams as qn, McpListResponseSchema as qr, FileListResponseSchema as qt, CreateCustomToolParams as r, MetaToolArguments as ra, McpUrlResponseCamelCase as ri, ToolRouterSessionFilesMountUploadOptionsSchema as rn, BaseComposioProvider as rr, ToolRouterSessionEnsureConnectedResult as rt, CustomToolDefinition as s, ToolOptions as sa, GlobalExecuteToolFn as si, ConnectedAccountAclConfig as sn, ComposioGenerateURLResponseSchema as sr, ToolRouterSessionExecuteResponseSchema as st, AnyZodSchema as t, BeforeFileUploadSource as ta, McpUpdateResponseSchema as ti, ToolRouterSessionFilesMountListOptionsSchema as tn, UpdateConnectedAccountParamsSchema as tr, ToolRouterSessionEnsureConnectedOptions as tt, CustomToolSlugSchema as u, afterExecuteModifier as ua, ToolCallSession as ui, ConnectedAccountAclConfigSchema as un, ComposioMcpRetrieveResponseSchema as ur, ToolRouterSessionListConfigHistoryOptionsSchema as ut, InferZodSchema as v, SchemaModifierOptions as va, CustomConnectionDataSchema as vi, ConnectedAccountExperimentalResponse as vn, GenerateURLResponse$1 as vr, ToolRouterSessionSearchResponseSchema as vt, MCPServerTypeSchema as w, ToolExecuteResponse as wa, Oauth1ActiveConnectionDataSchema as wi, ConnectedAccountListResponseItem as wn, MCPGenerateURLParams as wr, ToolRouterToolkitsDisabledConfigSchema as wt, RegisteredCustomToolkit as x, ToolExecuteMetaParamsSchema as xa, CustomOauth2ConnectionData as xi, ConnectedAccountListParams as xn, MCPAuthOptions as xr, ToolRouterSessionWorkbenchConfig as xt, InlineCustomToolsWirePayload as y, Tool as ya, CustomOauth1ConnectionData as yi, ConnectedAccountExperimentalResponseSchema as yn, GenerateURLResponseSchema as yr, ToolRouterSessionUpdateFn as yt, ToolRouterCreateSessionConfig as z, ToolkitVersion as za, Oauth2ConnectionData as zi, ConnectedAccountTypeSchema as zn, MCPSingleAppServer as zr, ToolkitConnectionState as zt };