import { $t as ConnectionData, G as BaseComposioProvider, L as SessionMetaToolOptions, en as ConnectionDataSchema, o as Tool, v as ToolProxyParams } from "./tool.types-BWc7GUrD.cjs";
import z$1, { z } from "zod/v3";
import { Composio } from "@composio/client";
import { ToolExecuteResponse } from "@composio/client/resources/tools";
import { SessionCreateParams, SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";

//#region src/types/connectedAccounts.types.d.ts
/**
 * Connected Account create parameters
 */
declare const ConnectedAccountStatuses: {
  readonly INITIALIZING: "INITIALIZING";
  readonly INITIATED: "INITIATED";
  readonly ACTIVE: "ACTIVE";
  readonly FAILED: "FAILED";
  readonly EXPIRED: "EXPIRED";
  readonly INACTIVE: "INACTIVE";
};
declare const ConnectedAccountStatusSchema: z.ZodEnum<["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED", "INACTIVE"]>;
type ConnectedAccountStatus = (typeof ConnectedAccountStatuses)[keyof typeof ConnectedAccountStatuses];
type ConnectedAccountStatusEnum = z.infer<typeof ConnectedAccountStatusSchema>;
declare const CreateConnectedAccountParamsSchema: z.ZodObject<{
  authConfig: z.ZodObject<{
    id: z.ZodString;
  }, "strip", z.ZodTypeAny, {
    id: string;
  }, {
    id: string;
  }>;
  connection: z.ZodObject<{
    data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    callbackUrl: z.ZodOptional<z.ZodString>;
    userId: z.ZodOptional<z.ZodString>;
  }, "strip", z.ZodTypeAny, {
    userId?: string | undefined;
    data?: Record<string, unknown> | undefined;
    callbackUrl?: string | undefined;
  }, {
    userId?: string | undefined;
    data?: Record<string, unknown> | undefined;
    callbackUrl?: string | undefined;
  }>;
}, "strip", z.ZodTypeAny, {
  authConfig: {
    id: string;
  };
  connection: {
    userId?: string | undefined;
    data?: Record<string, unknown> | undefined;
    callbackUrl?: string | undefined;
  };
}, {
  authConfig: {
    id: string;
  };
  connection: {
    userId?: string | undefined;
    data?: Record<string, unknown> | undefined;
    callbackUrl?: string | undefined;
  };
}>;
declare const DefaultCreateConnectedAccountParamsSchema: z.ZodType<{
  auth_config: {
    id: string;
  };
  connection: {
    state?: z.infer<typeof ConnectionDataSchema>;
    data?: Record<string, unknown>;
    callback_url?: string;
    user_id?: string;
  };
}>;
declare const CreateConnectedAccountOptionsSchema: z.ZodType<{
  allowMultiple?: boolean;
  callbackUrl?: string;
  config?: z.infer<typeof ConnectionDataSchema>;
}>;
type CreateConnectedAccountOptions = z.infer<typeof CreateConnectedAccountOptionsSchema>;
type CreateConnectedAccountParams = z.infer<typeof CreateConnectedAccountParamsSchema>;
/**
 * Connected Account create response
 */
declare const CreateConnectedAccountResponseSchema: z.ZodObject<{
  id: z.ZodString;
  status: z.ZodEnum<["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED", "INACTIVE"]>;
  redirectUrl: z.ZodNullable<z.ZodString>;
}, "strip", z.ZodTypeAny, {
  status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE";
  redirectUrl: string | null;
  id: string;
}, {
  status: "INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE";
  redirectUrl: string | null;
  id: string;
}>;
type CreateConnectedAccountResponse = z.infer<typeof CreateConnectedAccountResponseSchema>;
declare const ConnectedAccountAuthConfigSchema: z.ZodObject<{
  id: z.ZodString;
  /** @deprecated use connectedAccount.state.authScheme instead */
  authScheme: z.ZodOptional<z.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"]>>;
  isComposioManaged: z.ZodBoolean;
  isDisabled: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
  id: string;
  isComposioManaged: boolean;
  isDisabled: boolean;
  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;
}, {
  id: string;
  isComposioManaged: boolean;
  isDisabled: boolean;
  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;
}>;
type ConnectedAccountAuthConfig = z.infer<typeof ConnectedAccountAuthConfigSchema>;
declare const ConnectedAccountRetrieveResponseSchema: z.ZodType<{
  id: string;
  authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
  /** @deprecated use connectedAccount.state instead */
  data?: Record<string, unknown>;
  /** @deprecated use connectedAccount.state instead */
  params?: Record<string, unknown>;
  status: ConnectedAccountStatusEnum;
  statusReason: string | null;
  toolkit: {
    slug: string;
  };
  state?: z.infer<typeof ConnectionDataSchema>;
  testRequestEndpoint?: string;
  isDisabled: boolean;
  createdAt: string;
  updatedAt: string;
}>;
type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveResponseSchema>;
/**
 * Type for list response item that doesn't include params
 */
type ConnectedAccountListResponseItem = Omit<ConnectedAccountRetrieveResponse, 'params'>;
declare const ConnectedAccountListParamsSchema: z.ZodObject<{
  authConfigIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
  cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
  orderBy: z.ZodOptional<z.ZodEnum<["created_at", "updated_at"]>>;
  statuses: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["INITIALIZING", "INITIATED", "ACTIVE", "FAILED", "EXPIRED", "INACTIVE"]>, "many">>>;
  toolkitSlugs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
  userIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
}, "strip", z.ZodTypeAny, {
  limit?: number | null | undefined;
  authConfigIds?: string[] | null | undefined;
  cursor?: string | null | undefined;
  orderBy?: "created_at" | "updated_at" | undefined;
  statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE")[] | null | undefined;
  toolkitSlugs?: string[] | null | undefined;
  userIds?: string[] | null | undefined;
}, {
  limit?: number | null | undefined;
  authConfigIds?: string[] | null | undefined;
  cursor?: string | null | undefined;
  orderBy?: "created_at" | "updated_at" | undefined;
  statuses?: ("INITIALIZING" | "INITIATED" | "ACTIVE" | "FAILED" | "EXPIRED" | "INACTIVE")[] | null | undefined;
  toolkitSlugs?: string[] | null | undefined;
  userIds?: string[] | null | undefined;
}>;
type ConnectedAccountListParams = z.infer<typeof ConnectedAccountListParamsSchema>;
declare const ConnectedAccountListResponseSchema: z.ZodObject<{
  items: z.ZodArray<z.ZodType<{
    id: string;
    authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
    /** @deprecated use connectedAccount.state instead */
    data?: Record<string, unknown>;
    /** @deprecated use connectedAccount.state instead */
    params?: Record<string, unknown>;
    status: ConnectedAccountStatusEnum;
    statusReason: string | null;
    toolkit: {
      slug: string;
    };
    state?: z.infer<typeof ConnectionDataSchema>;
    testRequestEndpoint?: string;
    isDisabled: boolean;
    createdAt: string;
    updatedAt: string;
  }, z.ZodTypeDef, {
    id: string;
    authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
    /** @deprecated use connectedAccount.state instead */
    data?: Record<string, unknown>;
    /** @deprecated use connectedAccount.state instead */
    params?: Record<string, unknown>;
    status: ConnectedAccountStatusEnum;
    statusReason: string | null;
    toolkit: {
      slug: string;
    };
    state?: z.infer<typeof ConnectionDataSchema>;
    testRequestEndpoint?: string;
    isDisabled: boolean;
    createdAt: string;
    updatedAt: string;
  }>, "many">;
  nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
  totalPages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
  items: {
    id: string;
    authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
    /** @deprecated use connectedAccount.state instead */
    data?: Record<string, unknown>;
    /** @deprecated use connectedAccount.state instead */
    params?: Record<string, unknown>;
    status: ConnectedAccountStatusEnum;
    statusReason: string | null;
    toolkit: {
      slug: string;
    };
    state?: z.infer<typeof ConnectionDataSchema>;
    testRequestEndpoint?: string;
    isDisabled: boolean;
    createdAt: string;
    updatedAt: string;
  }[];
  totalPages: number;
  nextCursor?: string | null | undefined;
}, {
  items: {
    id: string;
    authConfig: z.infer<typeof ConnectedAccountAuthConfigSchema>;
    /** @deprecated use connectedAccount.state instead */
    data?: Record<string, unknown>;
    /** @deprecated use connectedAccount.state instead */
    params?: Record<string, unknown>;
    status: ConnectedAccountStatusEnum;
    statusReason: string | null;
    toolkit: {
      slug: string;
    };
    state?: z.infer<typeof ConnectionDataSchema>;
    testRequestEndpoint?: string;
    isDisabled: boolean;
    createdAt: string;
    updatedAt: string;
  }[];
  totalPages: number;
  nextCursor?: string | null | undefined;
}>;
type ConnectedAccountListResponse = z.infer<typeof ConnectedAccountListResponseSchema>;
declare const CreateConnectedAccountLinkOptionsSchema: z.ZodObject<{
  /**
   * The url to redirect the user to post connecting their account.
   *
   * For sucessfull connections, you will get a query param called status=success
   * And for failed connections you will get a query param called satus=failed
   *
   * @example https://your-app.com/callback
   *
   */
  callbackUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
  callbackUrl?: string | undefined;
}, {
  callbackUrl?: string | undefined;
}>;
type CreateConnectedAccountLinkOptions = z.infer<typeof CreateConnectedAccountLinkOptionsSchema>;
declare const CreateConnectedAccountLinkResponseSchema: z.ZodObject<{
  redirectUrl: z.ZodString;
}, "strip", z.ZodTypeAny, {
  redirectUrl: string;
}, {
  redirectUrl: string;
}>;
type CreateConnectedAccountLinkResponse = z.infer<typeof CreateConnectedAccountLinkResponseSchema>;
declare const ConnectedAccountRefreshOptionsSchema: z.ZodObject<{
  redirectUrl: z.ZodOptional<z.ZodString>;
  validateCredentials: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
  redirectUrl?: string | undefined;
  validateCredentials?: boolean | undefined;
}, {
  redirectUrl?: string | undefined;
  validateCredentials?: boolean | undefined;
}>;
type ConnectedAccountRefreshOptions = z.infer<typeof ConnectedAccountRefreshOptionsSchema>;
//#endregion
//#region src/types/connectionRequest.types.d.ts
interface ConnectionRequestState {
  id: string;
  status?: ConnectedAccountStatus;
  redirectUrl?: string | null;
}
interface ConnectionRequest extends ConnectionRequestState {
  waitForConnection: (timeout?: number) => Promise<ConnectedAccountRetrieveResponse>;
  toJSON: () => ConnectionRequestState;
  toString: () => string;
}
//#endregion
//#region src/types/ToolRouterSessionFilesMount.types.d.ts
declare const ToolRouterSessionFilesMountListOptionsSchema: z$1.ZodObject<{
  path: z$1.ZodOptional<z$1.ZodString>;
  mountId: z$1.ZodDefault<z$1.ZodString>;
  /** Pagination cursor from the previous response nextCursor field */
  cursor: z$1.ZodOptional<z$1.ZodString>;
  /** Maximum number of files to return per page (1-500) */
  limit: z$1.ZodOptional<z$1.ZodNumber>;
}, "strip", z$1.ZodTypeAny, {
  mountId: string;
  path?: string | undefined;
  limit?: number | undefined;
  cursor?: string | undefined;
}, {
  path?: string | undefined;
  limit?: number | undefined;
  cursor?: string | undefined;
  mountId?: string | undefined;
}>;
type ToolRouterSessionFilesMountListOptions = z$1.input<typeof ToolRouterSessionFilesMountListOptionsSchema>;
declare const FileListResponseSchema: z$1.ZodEffects<z$1.ZodObject<{
  items: z$1.ZodArray<z$1.ZodObject<{
    last_modified: z$1.ZodString;
    mount_relative_path: z$1.ZodString;
    sandbox_mount_prefix: z$1.ZodString;
    size: z$1.ZodNumber;
  }, "strip", z$1.ZodTypeAny, {
    last_modified: string;
    mount_relative_path: string;
    sandbox_mount_prefix: string;
    size: number;
  }, {
    last_modified: string;
    mount_relative_path: string;
    sandbox_mount_prefix: string;
    size: number;
  }>, "many">;
  next_cursor: z$1.ZodOptional<z$1.ZodString>;
}, "strip", z$1.ZodTypeAny, {
  items: {
    last_modified: string;
    mount_relative_path: string;
    sandbox_mount_prefix: string;
    size: number;
  }[];
  next_cursor?: string | undefined;
}, {
  items: {
    last_modified: string;
    mount_relative_path: string;
    sandbox_mount_prefix: string;
    size: number;
  }[];
  next_cursor?: string | undefined;
}>, {
  items: {
    lastModified: string;
    mountRelativePath: string;
    sandboxMountPrefix: string;
    size: number;
  }[];
  nextCursor: string | undefined;
}, {
  items: {
    last_modified: string;
    mount_relative_path: string;
    sandbox_mount_prefix: string;
    size: number;
  }[];
  next_cursor?: string | undefined;
}>;
type FileListResponse = z$1.infer<typeof FileListResponseSchema>;
declare const ToolRouterSessionFilesMountUploadOptionsSchema: z$1.ZodObject<{
  /** Remote path/filename on the mount. When passing a buffer, either mimetype or remotePath is required. */
  remotePath: z$1.ZodOptional<z$1.ZodString>;
  mountId: z$1.ZodDefault<z$1.ZodString>;
  /** MIME type. When passing a buffer, either mimetype or remotePath is required. Ignored when passing File (uses file.type). */
  mimetype: z$1.ZodOptional<z$1.ZodString>;
}, "strip", z$1.ZodTypeAny, {
  mountId: string;
  remotePath?: string | undefined;
  mimetype?: string | undefined;
}, {
  mountId?: string | undefined;
  remotePath?: string | undefined;
  mimetype?: string | undefined;
}>;
type ToolRouterSessionFilesMountUploadOptions = z$1.input<typeof ToolRouterSessionFilesMountUploadOptionsSchema>;
declare const ToolRouterSessionFilesMountDownloadOptionsSchema: z$1.ZodObject<{
  mountId: z$1.ZodDefault<z$1.ZodString>;
}, "strip", z$1.ZodTypeAny, {
  mountId: string;
}, {
  mountId?: string | undefined;
}>;
type ToolRouterSessionFilesMountDownloadOptions = z$1.input<typeof ToolRouterSessionFilesMountDownloadOptionsSchema>;
declare const ToolRouterSessionFilesMountDeleteOptionsSchema: z$1.ZodObject<{
  mountId: z$1.ZodDefault<z$1.ZodString>;
}, "strip", z$1.ZodTypeAny, {
  mountId: string;
}, {
  mountId?: string | undefined;
}>;
type ToolRouterSessionFilesMountDeleteOptions = z$1.input<typeof ToolRouterSessionFilesMountDeleteOptionsSchema>;
declare const RemoteFileDataSchema: z$1.ZodEffects<z$1.ZodObject<{
  expires_at: z$1.ZodString;
  mount_relative_path: z$1.ZodString;
  sandbox_mount_prefix: z$1.ZodString;
  download_url: z$1.ZodString;
}, "strip", z$1.ZodTypeAny, {
  mount_relative_path: string;
  sandbox_mount_prefix: string;
  expires_at: string;
  download_url: string;
}, {
  mount_relative_path: string;
  sandbox_mount_prefix: string;
  expires_at: string;
  download_url: string;
}>, {
  expiresAt: string;
  mountRelativePath: string;
  sandboxMountPrefix: string;
  downloadUrl: string;
}, {
  mount_relative_path: string;
  sandbox_mount_prefix: string;
  expires_at: string;
  download_url: string;
}>;
/** Parsed shape from API response. Use with `new RemoteFile(data)`. */
type RemoteFileData = z$1.infer<typeof RemoteFileDataSchema>;
declare const FileDeleteResponseSchema: z$1.ZodEffects<z$1.ZodObject<{
  mount_relative_path: z$1.ZodString;
  sandbox_mount_prefix: z$1.ZodString;
}, "strip", z$1.ZodTypeAny, {
  mount_relative_path: string;
  sandbox_mount_prefix: string;
}, {
  mount_relative_path: string;
  sandbox_mount_prefix: string;
}>, {
  mountRelativePath: string;
  sandboxMountPrefix: string;
}, {
  mount_relative_path: string;
  sandbox_mount_prefix: string;
}>;
type FileDeleteResponse = z$1.infer<typeof FileDeleteResponseSchema>;
//#endregion
//#region src/models/RemoteFile.d.ts
/**
 * Represents a file stored in a tool router session's file mount.
 * Provides methods to fetch, save, and work with the file content.
 *
 * @example
 * ```typescript
 * const remoteFile = await session.experimental.files.download('/output/report.pdf');
 * const buffer = await remoteFile.buffer();
 * await remoteFile.save('/tmp/report.pdf');
 * const text = await remoteFile.text();
 * ```
 *
 * @example
 * ```typescript
 * // Create from API response (snake_case)
 * const remoteFile = RemoteFile.parse(apiResponse);
 *
 * // Or create from parsed data (camelCase)
 * const remoteFile = new RemoteFile({
 *   expiresAt: '...',
 *   mountRelativePath: 'report.pdf',
 *   sandboxMountPrefix: '/mnt/files',
 *   downloadUrl: 'https://...',
 * });
 * ```
 */
declare class RemoteFile {
  /** ISO 8601 timestamp when the download URL expires */
  readonly expiresAt: string;
  /** Relative path within the mount (e.g. "report.pdf") */
  readonly mountRelativePath: string;
  /** Absolute mount path inside the sandbox (e.g. /mnt/files) */
  readonly sandboxMountPrefix: string;
  /** Presigned URL for downloading the file */
  readonly downloadUrl: string;
  constructor(data: RemoteFileData);
  /**
   * Parses an API response (snake_case) and returns a RemoteFile instance.
   * @param data - Raw API response with snake_case keys
   * @returns A RemoteFile instance
   * @throws ValidationError if the response shape is invalid
   */
  static parse(data: unknown): RemoteFile;
  /** Filename extracted from the mount path (e.g. "report.pdf" from "output/report.pdf") */
  get filename(): string;
  /**
   * Fetches the file content as a buffer.
   * @returns The file content as a Uint8Array
   * @throws RemoteFileDownloadError if the fetch fails
   */
  buffer(): Promise<Uint8Array>;
  /**
   * Fetches the file content as UTF-8 text.
   * @returns The file content as a string
   * @throws Error if the fetch fails
   */
  text(): Promise<string>;
  /**
   * Fetches the file content as a Blob.
   * @returns The file content as a Blob
   * @throws RemoteFileDownloadError if the fetch fails
   */
  blob(): Promise<Blob>;
  /**
   * Downloads and saves the file to the local filesystem.
   * Requires a Node.js runtime with file system support (not available in Cloudflare Workers/Edge).
   *
   * @param path - Local path to save the file. If omitted, saves to the Composio temp directory using the filename from the mount path.
   * @returns The absolute path where the file was saved
   * @throws Error if file system is not supported or the save fails
   */
  save(path?: string): Promise<string>;
}
//#endregion
//#region src/models/ToolRouterSessionFileMount.d.ts
declare class ToolRouterSessionFilesMount {
  private readonly sessionId;
  private readonly client;
  constructor(client: Composio, sessionId: string);
  /**
   * Lists files and directories at the specified path on the session's file mount.
   *
   * Use this to browse the virtual filesystem attached to the tool router session.
   * The path is relative to the mount root (e.g., `"/"` for root, `"/documents"` for a subdirectory).
   * Supports cursor-based pagination via `cursor` and `limit` options.
   *
   * @param options - Optional configuration for the list operation.
   * @param options.path - The directory path to list. Use `"/"` for the mount root.
   * @param options.mountId - The ID of the file mount to operate on. Defaults to `"files"` when omitted.
   * @param options.cursor - Pagination cursor from the previous response's nextCursor field.
   * @param options.limit - Maximum number of files to return per page (1-500).
   * @returns List of files with nextCursor for pagination.
   *
   * @example
   * ```typescript
   * const session = await composio.toolRouter.use('session_123');
   * const { items, nextCursor } = await session.experimental.files.list({ path: '/' });
   * ```
   *
   * @example
   * ```typescript
   * // Paginated listing
   * let result = await session.experimental.files.list({ path: '/', limit: 10 });
   * while (result.nextCursor) {
   *   result = await session.experimental.files.list({ path: '/', cursor: result.nextCursor, limit: 10 });
   * }
   * ```
   */
  list(options?: ToolRouterSessionFilesMountListOptions): Promise<FileListResponse>;
  private normalizeUploadInput;
  /**
   * Uploads a file to the session's file mount.
   *
   * Accepts a file path (local or URL), a native File object, or a raw buffer.
   * The file is stored in the virtual filesystem associated with the tool router session.
   *
   * @param input - File path (string), native File, or raw buffer (ArrayBuffer | Uint8Array).
   * @param options - Optional configuration. When passing a buffer, remotePath is required.
   * @returns Metadata about the uploaded file.
   *
   * @example
   * ```typescript
   * // From file path (local or URL)
   * await session.experimental.files.upload('/path/to/report.pdf');
   * await session.experimental.files.upload('https://example.com/file.pdf');
   * ```
   *
   * @example
   * ```typescript
   * // From native File (e.g. from input[type=file])
   * await session.experimental.files.upload(fileInput.files[0]);
   * ```
   *
   * @example
   * ```typescript
   * // From raw buffer
   * await session.experimental.files.upload(buffer, { remotePath: 'data.json', mimetype: 'application/json' });
   * ```
   */
  upload(input: string | File | ArrayBuffer | Uint8Array, options?: ToolRouterSessionFilesMountUploadOptions): Promise<RemoteFile>;
  /**
   * Downloads a file from the session's file mount to the local filesystem.
   *
   * Retrieves a file stored in the session's virtual filesystem (e.g., one produced
   * by a tool or previously uploaded) and saves it to the specified local path.
   *
   * @param filePath - The path of the file on the mount to download, or the local path where the file should be saved (implementation-specific).
   * @param options - Optional configuration for the download.
   * @param options.mountId - The ID of the file mount to download from. Defaults to `"files"` when omitted.
   * @returns The downloaded file data or path (implementation-specific).
   *
   * @example
   * ```typescript
   * const session = await composio.toolRouter.use('session_123');
   * const result = await session.experimental.files.download('/output/report.pdf');
   * ```
   *
   * @example
   * ```typescript
   * // Download from a custom mount
   * await session.experimental.files.download('/exports/data.json', {
   *   mountId: 'custom-mount',
   * });
   * ```
   */
  download(filePath: string, options?: ToolRouterSessionFilesMountDownloadOptions): Promise<RemoteFile>;
  /**
   * Deletes a file or directory at the specified path on the session's file mount.
   *
   * Removes the file or directory from the virtual filesystem. Use with caution:
   * deletion is typically irreversible. Ensure the path exists and is intended for removal.
   *
   * @param remotePath - The path of the file or directory to delete on the mount.
   * @param options - Optional configuration for the delete operation.
   * @param options.mountId - The ID of the file mount to operate on. Defaults to `"files"` when omitted.
   * @returns Confirmation of deletion (implementation-specific).
   *
   * @example
   * ```typescript
   * const session = await composio.toolRouter.use('session_123');
   * await session.experimental.files.delete('/temp/cache.json');
   * ```
   *
   * @example
   * ```typescript
   * // Delete from a custom mount
   * await session.experimental.files.delete('/old-backup', {
   *   mountId: 'custom-mount',
   * });
   * ```
   *
   * @warning This operation is destructive. Deleted files cannot be recovered.
   */
  delete(remotePath: string, options?: ToolRouterSessionFilesMountDeleteOptions): Promise<FileDeleteResponse>;
}
//#endregion
//#region src/types/toolRouter.types.d.ts
declare const MCPServerTypeSchema: z$1.ZodEnum<["http", "sse"]>;
type MCPServerType = z$1.infer<typeof MCPServerTypeSchema>;
declare const ToolRouterConfigManageConnectionsSchema: z$1.ZodObject<{
  enable: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
  callbackUrl: z$1.ZodOptional<z$1.ZodString>;
  waitForConnections: z$1.ZodOptional<z$1.ZodBoolean>;
}, "strict", z$1.ZodTypeAny, {
  callbackUrl?: string | undefined;
  enable?: boolean | undefined;
  waitForConnections?: boolean | undefined;
}, {
  callbackUrl?: string | undefined;
  enable?: boolean | undefined;
  waitForConnections?: boolean | undefined;
}>;
declare const ToolRouterToolkitsParamSchema: z$1.ZodArray<z$1.ZodString, "many">;
declare const ToolRouterToolkitsDisabledConfigSchema: z$1.ZodObject<{
  disable: z$1.ZodArray<z$1.ZodString, "many">;
}, "strict", z$1.ZodTypeAny, {
  disable: string[];
}, {
  disable: string[];
}>;
declare const ToolRouterToolkitsEnabledConfigSchema: z$1.ZodObject<{
  enable: z$1.ZodArray<z$1.ZodString, "many">;
}, "strict", z$1.ZodTypeAny, {
  enable: string[];
}, {
  enable: string[];
}>;
declare const ToolRouterManageConnectionsConfigSchema: z$1.ZodObject<{
  enable: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
  callbackUrl: z$1.ZodOptional<z$1.ZodString>;
}, "strip", z$1.ZodTypeAny, {
  enable: boolean;
  callbackUrl?: string | undefined;
}, {
  callbackUrl?: string | undefined;
  enable?: boolean | undefined;
}>;
declare const ToolRouterTagsParamSchema: z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">;
declare const ToolRouterTagsEnableDisableSchema: z$1.ZodObject<{
  enable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
  disable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
}, "strict", z$1.ZodTypeAny, {
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
}, {
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
}>;
declare const ToolRouterConfigTagsSchema: z$1.ZodUnion<[z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">, z$1.ZodObject<{
  enable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
  disable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
}, "strict", z$1.ZodTypeAny, {
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
}, {
  enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
}>]>;
type ToolRouterConfigTags = z$1.infer<typeof ToolRouterConfigTagsSchema>;
/**
 *  Tools config - Configure tools per toolkit using toolkit slug as key
 * @example
 * ```typescript
 *  {
 *      gmail: {
 *          enable: ['gmail_search', 'gmail_send']
 *      },
 *      slack: {
 *          disable: ['slack_delete_message']
 *      }
 *  }
 * ```
 *
 * @example
 * ```typescript
 *  {
 *      gmail: ['gmail_search', 'gmail_send'],
 *      slack: { tags: ['readOnlyHint'] }
 *  }
 * ```
 */
declare const ToolRouterToolsParamSchema: z$1.ZodArray<z$1.ZodString, "many">;
type ToolRouterToolsParam = z$1.infer<typeof ToolRouterToolsParamSchema>;
declare const ToolRouterConfigToolsSchema: z$1.ZodEffects<z$1.ZodUnion<[z$1.ZodArray<z$1.ZodString, "many">, z$1.ZodObject<{
  enable: z$1.ZodArray<z$1.ZodString, "many">;
}, "strict", z$1.ZodTypeAny, {
  enable: string[];
}, {
  enable: string[];
}>, z$1.ZodObject<{
  disable: z$1.ZodArray<z$1.ZodString, "many">;
}, "strict", z$1.ZodTypeAny, {
  disable: string[];
}, {
  disable: string[];
}>, z$1.ZodObject<{
  tags: z$1.ZodUnion<[z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">, z$1.ZodObject<{
    enable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
    disable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
  }, "strict", z$1.ZodTypeAny, {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  }, {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  }>]>;
}, "strict", z$1.ZodTypeAny, {
  tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  };
}, {
  tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  };
}>]>, string[] | {
  enable: string[];
} | {
  disable: string[];
} | {
  tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  };
}, string[] | {
  enable: string[];
} | {
  disable: string[];
} | {
  tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  };
}>;
type ToolRouterConfigTools = z$1.infer<typeof ToolRouterConfigToolsSchema>;
declare const ToolRouterCreateSessionConfigSchema: z$1.ZodObject<{
  tools: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnion<[z$1.ZodArray<z$1.ZodString, "many">, z$1.ZodEffects<z$1.ZodUnion<[z$1.ZodArray<z$1.ZodString, "many">, z$1.ZodObject<{
    enable: z$1.ZodArray<z$1.ZodString, "many">;
  }, "strict", z$1.ZodTypeAny, {
    enable: string[];
  }, {
    enable: string[];
  }>, z$1.ZodObject<{
    disable: z$1.ZodArray<z$1.ZodString, "many">;
  }, "strict", z$1.ZodTypeAny, {
    disable: string[];
  }, {
    disable: string[];
  }>, z$1.ZodObject<{
    tags: z$1.ZodUnion<[z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">, z$1.ZodObject<{
      enable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
      disable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
    }, "strict", z$1.ZodTypeAny, {
      enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
      disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    }, {
      enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
      disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    }>]>;
  }, "strict", z$1.ZodTypeAny, {
    tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
      enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
      disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    };
  }, {
    tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
      enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
      disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    };
  }>]>, string[] | {
    enable: string[];
  } | {
    disable: string[];
  } | {
    tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
      enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
      disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    };
  }, string[] | {
    enable: string[];
  } | {
    disable: string[];
  } | {
    tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
      enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
      disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    };
  }>]>>>>;
  tags: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodUnion<[z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">, z$1.ZodObject<{
    enable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
    disable: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"]>, "many">>;
  }, "strict", z$1.ZodTypeAny, {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  }, {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  }>]>>>;
  toolkits: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodUnion<[z$1.ZodArray<z$1.ZodString, "many">, z$1.ZodObject<{
    disable: z$1.ZodArray<z$1.ZodString, "many">;
  }, "strict", z$1.ZodTypeAny, {
    disable: string[];
  }, {
    disable: string[];
  }>, z$1.ZodObject<{
    enable: z$1.ZodArray<z$1.ZodString, "many">;
  }, "strict", z$1.ZodTypeAny, {
    enable: string[];
  }, {
    enable: string[];
  }>]>>>;
  authConfigs: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>>;
  connectedAccounts: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>>;
  manageConnections: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodOptional<z$1.ZodUnion<[z$1.ZodBoolean, z$1.ZodObject<{
    enable: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
    callbackUrl: z$1.ZodOptional<z$1.ZodString>;
    waitForConnections: z$1.ZodOptional<z$1.ZodBoolean>;
  }, "strict", z$1.ZodTypeAny, {
    callbackUrl?: string | undefined;
    enable?: boolean | undefined;
    waitForConnections?: boolean | undefined;
  }, {
    callbackUrl?: string | undefined;
    enable?: boolean | undefined;
    waitForConnections?: boolean | undefined;
  }>]>>>>;
  workbench: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodObject<{
    enable: z$1.ZodDefault<z$1.ZodBoolean>;
    enableProxyExecution: z$1.ZodOptional<z$1.ZodBoolean>;
    autoOffloadThreshold: z$1.ZodOptional<z$1.ZodNumber>;
  }, "strip", z$1.ZodTypeAny, {
    enable: boolean;
    enableProxyExecution?: boolean | undefined;
    autoOffloadThreshold?: number | undefined;
  }, {
    enable?: boolean | undefined;
    enableProxyExecution?: boolean | undefined;
    autoOffloadThreshold?: number | undefined;
  }>>>;
  experimental: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodObject<{
    assistivePrompt: z$1.ZodOptional<z$1.ZodObject<{
      userTimezone: z$1.ZodOptional<z$1.ZodString>;
    }, "strip", z$1.ZodTypeAny, {
      userTimezone?: string | undefined;
    }, {
      userTimezone?: string | undefined;
    }>>;
    customTools: z$1.ZodOptional<z$1.ZodArray<z$1.ZodType<CustomTool, z$1.ZodTypeDef, CustomTool>, "many">>;
    customToolkits: z$1.ZodOptional<z$1.ZodArray<z$1.ZodType<CustomToolkit, z$1.ZodTypeDef, CustomToolkit>, "many">>;
  }, "strip", z$1.ZodTypeAny, {
    assistivePrompt?: {
      userTimezone?: string | undefined;
    } | undefined;
    customTools?: CustomTool[] | undefined;
    customToolkits?: CustomToolkit[] | undefined;
  }, {
    assistivePrompt?: {
      userTimezone?: string | undefined;
    } | undefined;
    customTools?: CustomTool[] | undefined;
    customToolkits?: CustomToolkit[] | undefined;
  }>>>;
}, "strip", z$1.ZodTypeAny, {
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  } | undefined;
  tools?: Record<string, string[] | {
    enable: string[];
  } | {
    disable: string[];
  } | {
    tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
      enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
      disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    };
  }> | undefined;
  toolkits?: string[] | {
    disable: string[];
  } | {
    enable: string[];
  } | undefined;
  authConfigs?: Record<string, string> | undefined;
  connectedAccounts?: Record<string, string> | undefined;
  manageConnections?: boolean | {
    callbackUrl?: string | undefined;
    enable?: boolean | undefined;
    waitForConnections?: boolean | undefined;
  } | undefined;
  workbench?: {
    enable: boolean;
    enableProxyExecution?: boolean | undefined;
    autoOffloadThreshold?: number | undefined;
  } | undefined;
  experimental?: {
    assistivePrompt?: {
      userTimezone?: string | undefined;
    } | undefined;
    customTools?: CustomTool[] | undefined;
    customToolkits?: CustomToolkit[] | undefined;
  } | undefined;
}, {
  tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
    enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
  } | undefined;
  tools?: Record<string, string[] | {
    enable: string[];
  } | {
    disable: string[];
  } | {
    tags: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
      enable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
      disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
    };
  }> | undefined;
  toolkits?: string[] | {
    disable: string[];
  } | {
    enable: string[];
  } | undefined;
  authConfigs?: Record<string, string> | undefined;
  connectedAccounts?: Record<string, string> | undefined;
  manageConnections?: boolean | {
    callbackUrl?: string | undefined;
    enable?: boolean | undefined;
    waitForConnections?: boolean | undefined;
  } | undefined;
  workbench?: {
    enable?: boolean | undefined;
    enableProxyExecution?: boolean | undefined;
    autoOffloadThreshold?: number | undefined;
  } | undefined;
  experimental?: {
    assistivePrompt?: {
      userTimezone?: string | undefined;
    } | undefined;
    customTools?: CustomTool[] | undefined;
    customToolkits?: CustomToolkit[] | undefined;
  } | undefined;
}>;
/**
 * The config for the tool router session.
 *
 * @param {ToolRouterToolkitsParamSchema | ToolRouterToolkitsDisabledConfigSchema | ToolRouterToolkitsEnabledConfigSchema} toolkits - The toolkits to use in the tool router session
 * @param {Record<string, ToolRouterToolsParam | ToolRouterConfigTools>} tools - The tools to configure per toolkit (key is toolkit slug)
 * @param {Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>} tags - Global tags to filter tools by behavior
 * @param {Record<string, string>} authConfigs - The auth configs to use in the tool router session
 * @param {Record<string, string>} connectedAccounts - The connected accounts to use in the tool router session
 * @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.
 * @param {boolean} [manageConnections.enable] - Whether to use tools to manage connections in the tool router session @default true
 * @param {string} [manageConnections.callbackUrl] - The callback url to use in the tool router session
 * @param {object} workbench - Workbench configuration for tool execution
 * @param {boolean} [workbench.enable] - Whether to enable the workbench entirely. Defaults to true. When false, no code execution tools are available.
 * @param {boolean} [workbench.enableProxyExecution] - Whether to enable proxy execution
 * @param {number} [workbench.autoOffloadThreshold] - Auto offload threshold in characters for moving execution to workbench
 */
type ToolRouterCreateSessionConfig = z$1.infer<typeof ToolRouterCreateSessionConfigSchema>;
declare const ToolkitConnectionStateSchema: z$1.ZodObject<{
  slug: z$1.ZodString;
  name: z$1.ZodString;
  logo: z$1.ZodOptional<z$1.ZodString>;
  isNoAuth: z$1.ZodDefault<z$1.ZodBoolean>;
  connection: z$1.ZodOptional<z$1.ZodObject<{
    isActive: z$1.ZodBoolean;
    authConfig: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
      id: z$1.ZodString;
      mode: z$1.ZodString;
      isComposioManaged: z$1.ZodBoolean;
    }, "strip", z$1.ZodTypeAny, {
      id: string;
      mode: string;
      isComposioManaged: boolean;
    }, {
      id: string;
      mode: string;
      isComposioManaged: boolean;
    }>>>;
    connectedAccount: z$1.ZodOptional<z$1.ZodObject<{
      id: z$1.ZodString;
      status: z$1.ZodString;
    }, "strip", z$1.ZodTypeAny, {
      status: string;
      id: string;
    }, {
      status: string;
      id: string;
    }>>;
  }, "strip", z$1.ZodTypeAny, {
    isActive: boolean;
    authConfig?: {
      id: string;
      mode: string;
      isComposioManaged: boolean;
    } | null | undefined;
    connectedAccount?: {
      status: string;
      id: string;
    } | undefined;
  }, {
    isActive: boolean;
    authConfig?: {
      id: string;
      mode: string;
      isComposioManaged: boolean;
    } | null | undefined;
    connectedAccount?: {
      status: string;
      id: string;
    } | undefined;
  }>>;
}, "strip", z$1.ZodTypeAny, {
  slug: string;
  name: string;
  isNoAuth: boolean;
  logo?: string | undefined;
  connection?: {
    isActive: boolean;
    authConfig?: {
      id: string;
      mode: string;
      isComposioManaged: boolean;
    } | null | undefined;
    connectedAccount?: {
      status: string;
      id: string;
    } | undefined;
  } | undefined;
}, {
  slug: string;
  name: string;
  logo?: string | undefined;
  isNoAuth?: boolean | undefined;
  connection?: {
    isActive: boolean;
    authConfig?: {
      id: string;
      mode: string;
      isComposioManaged: boolean;
    } | null | undefined;
    connectedAccount?: {
      status: string;
      id: string;
    } | undefined;
  } | undefined;
}>;
declare const ToolkitConnectionsDetailsSchema: z$1.ZodObject<{
  items: z$1.ZodArray<z$1.ZodObject<{
    slug: z$1.ZodString;
    name: z$1.ZodString;
    logo: z$1.ZodOptional<z$1.ZodString>;
    isNoAuth: z$1.ZodDefault<z$1.ZodBoolean>;
    connection: z$1.ZodOptional<z$1.ZodObject<{
      isActive: z$1.ZodBoolean;
      authConfig: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
        id: z$1.ZodString;
        mode: z$1.ZodString;
        isComposioManaged: z$1.ZodBoolean;
      }, "strip", z$1.ZodTypeAny, {
        id: string;
        mode: string;
        isComposioManaged: boolean;
      }, {
        id: string;
        mode: string;
        isComposioManaged: boolean;
      }>>>;
      connectedAccount: z$1.ZodOptional<z$1.ZodObject<{
        id: z$1.ZodString;
        status: z$1.ZodString;
      }, "strip", z$1.ZodTypeAny, {
        status: string;
        id: string;
      }, {
        status: string;
        id: string;
      }>>;
    }, "strip", z$1.ZodTypeAny, {
      isActive: boolean;
      authConfig?: {
        id: string;
        mode: string;
        isComposioManaged: boolean;
      } | null | undefined;
      connectedAccount?: {
        status: string;
        id: string;
      } | undefined;
    }, {
      isActive: boolean;
      authConfig?: {
        id: string;
        mode: string;
        isComposioManaged: boolean;
      } | null | undefined;
      connectedAccount?: {
        status: string;
        id: string;
      } | undefined;
    }>>;
  }, "strip", z$1.ZodTypeAny, {
    slug: string;
    name: string;
    isNoAuth: boolean;
    logo?: string | undefined;
    connection?: {
      isActive: boolean;
      authConfig?: {
        id: string;
        mode: string;
        isComposioManaged: boolean;
      } | null | undefined;
      connectedAccount?: {
        status: string;
        id: string;
      } | undefined;
    } | undefined;
  }, {
    slug: string;
    name: string;
    logo?: string | undefined;
    isNoAuth?: boolean | undefined;
    connection?: {
      isActive: boolean;
      authConfig?: {
        id: string;
        mode: string;
        isComposioManaged: boolean;
      } | null | undefined;
      connectedAccount?: {
        status: string;
        id: string;
      } | undefined;
    } | undefined;
  }>, "many">;
  nextCursor: z$1.ZodOptional<z$1.ZodString>;
  totalPages: z$1.ZodNumber;
}, "strip", z$1.ZodTypeAny, {
  items: {
    slug: string;
    name: string;
    isNoAuth: boolean;
    logo?: string | undefined;
    connection?: {
      isActive: boolean;
      authConfig?: {
        id: string;
        mode: string;
        isComposioManaged: boolean;
      } | null | undefined;
      connectedAccount?: {
        status: string;
        id: string;
      } | undefined;
    } | undefined;
  }[];
  totalPages: number;
  nextCursor?: string | undefined;
}, {
  items: {
    slug: string;
    name: string;
    logo?: string | undefined;
    isNoAuth?: boolean | undefined;
    connection?: {
      isActive: boolean;
      authConfig?: {
        id: string;
        mode: string;
        isComposioManaged: boolean;
      } | null | undefined;
      connectedAccount?: {
        status: string;
        id: string;
      } | undefined;
    } | undefined;
  }[];
  totalPages: number;
  nextCursor?: string | undefined;
}>;
type ToolkitConnectionsDetails = z$1.infer<typeof ToolkitConnectionsDetailsSchema>;
type ToolkitConnectionState = z$1.infer<typeof ToolkitConnectionStateSchema>;
declare const ToolRouterMCPServerConfigSchema: z$1.ZodObject<{
  type: z$1.ZodEnum<["http", "sse"]>;
  url: z$1.ZodString;
  headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
}, "strip", z$1.ZodTypeAny, {
  type: "http" | "sse";
  url: string;
  headers?: Record<string, string> | undefined;
}, {
  type: "http" | "sse";
  url: string;
  headers?: Record<string, string> | undefined;
}>;
type ToolRouterMCPServerConfig = z$1.infer<typeof ToolRouterMCPServerConfigSchema>;
type ToolRouterToolsFn<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> = (modifiers?: SessionMetaToolOptions) => Promise<ReturnType<TProvider['wrapTools']>>;
type ToolRouterAuthorizeFn = (toolkit: string, options?: {
  callbackUrl?: string;
}) => Promise<ConnectionRequest>;
declare const ToolRouterToolkitsOptionsSchema: z$1.ZodObject<{
  toolkits: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
  nextCursor: z$1.ZodOptional<z$1.ZodString>;
  limit: z$1.ZodOptional<z$1.ZodNumber>;
  isConnected: z$1.ZodOptional<z$1.ZodBoolean>;
  search: z$1.ZodOptional<z$1.ZodString>;
}, "strip", z$1.ZodTypeAny, {
  nextCursor?: string | undefined;
  toolkits?: string[] | undefined;
  limit?: number | undefined;
  search?: string | undefined;
  isConnected?: boolean | undefined;
}, {
  nextCursor?: string | undefined;
  toolkits?: string[] | undefined;
  limit?: number | undefined;
  search?: string | undefined;
  isConnected?: boolean | undefined;
}>;
type ToolRouterToolkitsOptions = z$1.infer<typeof ToolRouterToolkitsOptionsSchema>;
type ToolRouterToolkitsFn = (options?: ToolRouterToolkitsOptions) => Promise<ToolkitConnectionsDetails>;
declare const ToolRouterSessionSearchResponseSchema: z$1.ZodObject<{
  success: z$1.ZodBoolean;
  error: z$1.ZodNullable<z$1.ZodString>;
  results: z$1.ZodArray<z$1.ZodObject<{
    index: z$1.ZodNumber;
    useCase: z$1.ZodString;
    primaryToolSlugs: z$1.ZodArray<z$1.ZodString, "many">;
    relatedToolSlugs: z$1.ZodArray<z$1.ZodString, "many">;
    toolkits: z$1.ZodArray<z$1.ZodString, "many">;
    difficulty: z$1.ZodOptional<z$1.ZodString>;
    error: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
    executionGuidance: z$1.ZodOptional<z$1.ZodString>;
    knownPitfalls: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
    memory: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodArray<z$1.ZodString, "many">>>;
    planId: z$1.ZodOptional<z$1.ZodString>;
    recommendedPlanSteps: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString, "many">>;
    referenceWorkbenchSnippets: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
      code: z$1.ZodString;
      description: z$1.ZodString;
    }, "strip", z$1.ZodTypeAny, {
      code: string;
      description: string;
    }, {
      code: string;
      description: string;
    }>, "many">>;
  }, "strip", z$1.ZodTypeAny, {
    toolkits: string[];
    index: number;
    useCase: string;
    primaryToolSlugs: string[];
    relatedToolSlugs: string[];
    error?: string | null | undefined;
    difficulty?: string | undefined;
    executionGuidance?: string | undefined;
    knownPitfalls?: string[] | undefined;
    memory?: Record<string, string[]> | undefined;
    planId?: string | undefined;
    recommendedPlanSteps?: string[] | undefined;
    referenceWorkbenchSnippets?: {
      code: string;
      description: string;
    }[] | undefined;
  }, {
    toolkits: string[];
    index: number;
    useCase: string;
    primaryToolSlugs: string[];
    relatedToolSlugs: string[];
    error?: string | null | undefined;
    difficulty?: string | undefined;
    executionGuidance?: string | undefined;
    knownPitfalls?: string[] | undefined;
    memory?: Record<string, string[]> | undefined;
    planId?: string | undefined;
    recommendedPlanSteps?: string[] | undefined;
    referenceWorkbenchSnippets?: {
      code: string;
      description: string;
    }[] | undefined;
  }>, "many">;
  toolSchemas: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
    toolSlug: z$1.ZodString;
    toolkit: z$1.ZodString;
    description: z$1.ZodOptional<z$1.ZodString>;
    hasFullSchema: z$1.ZodOptional<z$1.ZodBoolean>;
    inputSchema: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
    outputSchema: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
    schemaRef: z$1.ZodOptional<z$1.ZodObject<{
      args: z$1.ZodObject<{
        toolSlugs: z$1.ZodArray<z$1.ZodString, "many">;
      }, "strip", z$1.ZodTypeAny, {
        toolSlugs: string[];
      }, {
        toolSlugs: string[];
      }>;
      message: z$1.ZodString;
      tool: z$1.ZodLiteral<"COMPOSIO_GET_TOOL_SCHEMAS">;
    }, "strip", z$1.ZodTypeAny, {
      message: string;
      args: {
        toolSlugs: string[];
      };
      tool: "COMPOSIO_GET_TOOL_SCHEMAS";
    }, {
      message: string;
      args: {
        toolSlugs: string[];
      };
      tool: "COMPOSIO_GET_TOOL_SCHEMAS";
    }>>;
  }, "strip", z$1.ZodTypeAny, {
    toolkit: string;
    toolSlug: string;
    description?: string | undefined;
    hasFullSchema?: boolean | undefined;
    inputSchema?: Record<string, unknown> | undefined;
    outputSchema?: Record<string, unknown> | undefined;
    schemaRef?: {
      message: string;
      args: {
        toolSlugs: string[];
      };
      tool: "COMPOSIO_GET_TOOL_SCHEMAS";
    } | undefined;
  }, {
    toolkit: string;
    toolSlug: string;
    description?: string | undefined;
    hasFullSchema?: boolean | undefined;
    inputSchema?: Record<string, unknown> | undefined;
    outputSchema?: Record<string, unknown> | undefined;
    schemaRef?: {
      message: string;
      args: {
        toolSlugs: string[];
      };
      tool: "COMPOSIO_GET_TOOL_SCHEMAS";
    } | undefined;
  }>>;
  toolkitConnectionStatuses: z$1.ZodArray<z$1.ZodObject<{
    toolkit: z$1.ZodString;
    description: z$1.ZodString;
    hasActiveConnection: z$1.ZodBoolean;
    statusMessage: z$1.ZodString;
    connectionDetails: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
    currentUserInfo: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
  }, "strip", z$1.ZodTypeAny, {
    description: string;
    toolkit: string;
    hasActiveConnection: boolean;
    statusMessage: string;
    connectionDetails?: Record<string, unknown> | undefined;
    currentUserInfo?: Record<string, unknown> | undefined;
  }, {
    description: string;
    toolkit: string;
    hasActiveConnection: boolean;
    statusMessage: string;
    connectionDetails?: Record<string, unknown> | undefined;
    currentUserInfo?: Record<string, unknown> | undefined;
  }>, "many">;
  nextStepsGuidance: z$1.ZodArray<z$1.ZodString, "many">;
  session: z$1.ZodObject<{
    id: z$1.ZodString;
    generateId: z$1.ZodBoolean;
    instructions: z$1.ZodString;
  }, "strip", z$1.ZodTypeAny, {
    id: string;
    instructions: string;
    generateId: boolean;
  }, {
    id: string;
    instructions: string;
    generateId: boolean;
  }>;
  timeInfo: z$1.ZodObject<{
    currentTimeUtc: z$1.ZodString;
    currentTimeUtcEpochSeconds: z$1.ZodNumber;
    message: z$1.ZodString;
  }, "strip", z$1.ZodTypeAny, {
    message: string;
    currentTimeUtc: string;
    currentTimeUtcEpochSeconds: number;
  }, {
    message: string;
    currentTimeUtc: string;
    currentTimeUtcEpochSeconds: number;
  }>;
}, "strip", z$1.ZodTypeAny, {
  error: string | null;
  success: boolean;
  results: {
    toolkits: string[];
    index: number;
    useCase: string;
    primaryToolSlugs: string[];
    relatedToolSlugs: string[];
    error?: string | null | undefined;
    difficulty?: string | undefined;
    executionGuidance?: string | undefined;
    knownPitfalls?: string[] | undefined;
    memory?: Record<string, string[]> | undefined;
    planId?: string | undefined;
    recommendedPlanSteps?: string[] | undefined;
    referenceWorkbenchSnippets?: {
      code: string;
      description: string;
    }[] | undefined;
  }[];
  toolSchemas: Record<string, {
    toolkit: string;
    toolSlug: string;
    description?: string | undefined;
    hasFullSchema?: boolean | undefined;
    inputSchema?: Record<string, unknown> | undefined;
    outputSchema?: Record<string, unknown> | undefined;
    schemaRef?: {
      message: string;
      args: {
        toolSlugs: string[];
      };
      tool: "COMPOSIO_GET_TOOL_SCHEMAS";
    } | undefined;
  }>;
  toolkitConnectionStatuses: {
    description: string;
    toolkit: string;
    hasActiveConnection: boolean;
    statusMessage: string;
    connectionDetails?: Record<string, unknown> | undefined;
    currentUserInfo?: Record<string, unknown> | undefined;
  }[];
  nextStepsGuidance: string[];
  session: {
    id: string;
    instructions: string;
    generateId: boolean;
  };
  timeInfo: {
    message: string;
    currentTimeUtc: string;
    currentTimeUtcEpochSeconds: number;
  };
}, {
  error: string | null;
  success: boolean;
  results: {
    toolkits: string[];
    index: number;
    useCase: string;
    primaryToolSlugs: string[];
    relatedToolSlugs: string[];
    error?: string | null | undefined;
    difficulty?: string | undefined;
    executionGuidance?: string | undefined;
    knownPitfalls?: string[] | undefined;
    memory?: Record<string, string[]> | undefined;
    planId?: string | undefined;
    recommendedPlanSteps?: string[] | undefined;
    referenceWorkbenchSnippets?: {
      code: string;
      description: string;
    }[] | undefined;
  }[];
  toolSchemas: Record<string, {
    toolkit: string;
    toolSlug: string;
    description?: string | undefined;
    hasFullSchema?: boolean | undefined;
    inputSchema?: Record<string, unknown> | undefined;
    outputSchema?: Record<string, unknown> | undefined;
    schemaRef?: {
      message: string;
      args: {
        toolSlugs: string[];
      };
      tool: "COMPOSIO_GET_TOOL_SCHEMAS";
    } | undefined;
  }>;
  toolkitConnectionStatuses: {
    description: string;
    toolkit: string;
    hasActiveConnection: boolean;
    statusMessage: string;
    connectionDetails?: Record<string, unknown> | undefined;
    currentUserInfo?: Record<string, unknown> | undefined;
  }[];
  nextStepsGuidance: string[];
  session: {
    id: string;
    instructions: string;
    generateId: boolean;
  };
  timeInfo: {
    message: string;
    currentTimeUtc: string;
    currentTimeUtcEpochSeconds: number;
  };
}>;
type ToolRouterSessionSearchResponse = z$1.infer<typeof ToolRouterSessionSearchResponseSchema>;
declare const ToolRouterSessionExecuteResponseSchema: z$1.ZodObject<{
  data: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
  error: z$1.ZodNullable<z$1.ZodString>;
  logId: z$1.ZodString;
}, "strip", z$1.ZodTypeAny, {
  data: Record<string, unknown>;
  error: string | null;
  logId: string;
}, {
  data: Record<string, unknown>;
  error: string | null;
  logId: string;
}>;
type ToolRouterSessionExecuteResponse = z$1.infer<typeof ToolRouterSessionExecuteResponseSchema>;
interface ToolRouterSessionProxyExecuteResponse {
  /** The HTTP status code returned from the proxied API */
  status: number;
  /** The response data from the proxied API */
  data?: unknown;
  /** HTTP headers from the proxied API */
  headers?: Record<string, string>;
  /** Binary response data (present when response is a file) */
  binaryData?: {
    contentType: string;
    size: number;
    url: string;
    expiresAt?: string;
  };
}
/**
 * Experimental features on a tool router session.
 * Contains features that may be modified or removed in future versions.
 */
interface SessionExperimental {
  /**
   * The assistive system prompt to inject into your agent for optimal tool router usage.
   * Only returned on session creation, not on GET.
   */
  assistivePrompt?: string;
  /**
   * File mount operations (list, upload, download, delete) for the session's virtual filesystem.
   */
  files: ToolRouterSessionFilesMount;
}
type ToolRouterSessionSearchFn = (params: {
  query: string;
  toolkits?: string[];
}) => Promise<ToolRouterSessionSearchResponse>;
type ToolRouterSessionExecuteFn = (toolSlug: string, arguments_?: Record<string, unknown>) => Promise<ToolRouterSessionExecuteResponse>;
declare const SessionProxyExecuteParamsSchema: z$1.ZodObject<{
  /** The toolkit whose connected account to use for auth (e.g. 'gmail', 'github') */
  toolkit: z$1.ZodString;
  /** The API endpoint URL to call */
  endpoint: z$1.ZodString;
  /** HTTP method */
  method: z$1.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>;
  /** Request body (for POST/PUT/PATCH) */
  body: z$1.ZodOptional<z$1.ZodUnknown>;
  /** Query params or headers to include */
  parameters: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
    in: z$1.ZodEnum<["query", "header"]>;
    name: z$1.ZodString;
    value: z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber]>;
  }, "strip", z$1.ZodTypeAny, {
    name: string;
    value: string | number;
    in: "query" | "header";
  }, {
    name: string;
    value: string | number;
    in: "query" | "header";
  }>, "many">>;
}, "strip", z$1.ZodTypeAny, {
  toolkit: string;
  endpoint: string;
  method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
  body?: unknown;
  parameters?: {
    name: string;
    value: string | number;
    in: "query" | "header";
  }[] | undefined;
}, {
  toolkit: string;
  endpoint: string;
  method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
  body?: unknown;
  parameters?: {
    name: string;
    value: string | number;
    in: "query" | "header";
  }[] | undefined;
}>;
type SessionProxyExecuteParams = z$1.infer<typeof SessionProxyExecuteParamsSchema>;
type ToolRouterSessionProxyExecuteFn = (params: SessionProxyExecuteParams) => Promise<ToolRouterSessionProxyExecuteResponse>;
/** Session type returned by ToolRouter.create() and ToolRouter.use() */
interface Session<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> {
  sessionId: string;
  mcp: ToolRouterMCPServerConfig;
  tools: ToolRouterToolsFn<TToolCollection, TTool, TProvider>;
  authorize: ToolRouterAuthorizeFn;
  toolkits: ToolRouterToolkitsFn;
  /** Search for tools by semantic use case */
  search: ToolRouterSessionSearchFn;
  /** Execute a tool within the session */
  execute: ToolRouterSessionExecuteFn;
  /** Proxy an API call through Composio's auth layer using the session's connected account */
  proxyExecute: ToolRouterSessionProxyExecuteFn;
  /** List custom tools registered in this session, with their final slugs and schemas */
  customTools: (options?: {
    toolkit?: string;
  }) => RegisteredCustomTool[];
  /** List custom toolkits registered in this session, with final slugs on nested tools */
  customToolkits: () => RegisteredCustomToolkit[];
  /** Experimental features (files, assistive prompt, etc.) */
  experimental: SessionExperimental;
}
//#endregion
//#region src/types/customTool.types.d.ts
type BaseCustomToolOptions<T extends z.ZodType> = {
  name: string;
  description?: string;
  slug: string;
  inputParams: T;
};
type ToolkitBasedExecute<T extends z.ZodType> = {
  execute: (input: z.infer<T>, connectionConfig: ConnectionData | null, executeToolRequest: (data: ToolProxyParams) => Promise<ToolExecuteResponse>) => Promise<ToolExecuteResponse>;
  toolkitSlug: string;
};
type StandaloneExecute<T extends z.ZodType> = {
  execute: (input: z.infer<T>) => Promise<ToolExecuteResponse>;
  toolkitSlug?: never;
};
type CustomToolOptions<T extends z.ZodType> = BaseCustomToolOptions<T> & (ToolkitBasedExecute<T> | StandaloneExecute<T>);
type CustomToolRegistry = Map<string, {
  options: CustomToolOptions<CustomToolInputParameter>;
  schema: Tool;
}>;
type InputParamsSchema = {
  definitions: {
    input: {
      type: string;
      properties: Record<string, unknown>;
      required?: string[];
    };
  };
};
type CustomToolInputParameter = z.ZodType;
interface CustomToolRegistryItem {
  options: CustomToolOptions<CustomToolInputParameter>;
  schema: Tool;
}
interface ExecuteMetadata {
  userId: string;
  connectedAccountId?: string;
}
/**
 * Session context injected into custom tool execute functions at runtime.
 * Provides identity context and methods to call other tools or proxy API requests.
 */
interface SessionContext {
  /** The user ID for this session */
  readonly userId: string;
  /** Execute any Composio native tool from within a custom tool. Returns the same shape as session.execute(). */
  execute(toolSlug: string, arguments_: Record<string, unknown>): Promise<ToolRouterSessionExecuteResponse>;
  /** Proxy API calls through Composio's auth layer (resolved from session toolkit). */
  proxyExecute(params: SessionProxyExecuteParams): Promise<ToolRouterSessionProxyExecuteResponse>;
}
/**
 * Execute function for custom tools.
 * Just return the result data, or throw an error. The SDK wraps it internally.
 *
 * Supports two call patterns:
 * - `(input) => data` — for tools that don't need session context
 * - `(input, ctx) => data` — for tools that need to call other tools or proxy APIs
 */
type CustomToolExecuteFn<T extends z.ZodType> = (input: z.infer<T>, ctx: SessionContext) => Promise<Record<string, unknown>>;
/**
 * Zod schema for validating a custom tool slug.
 * Alphanumeric, underscores, and hyphens only. No `LOCAL_` or `COMPOSIO_` prefix.
 * Length is validated contextually (standalone vs extension vs toolkit) at creation time.
 */
declare const CustomToolSlugSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
/**
 * Zod schema for validating the string/scalar fields of createCustomTool() options.
 * Slug is validated separately as the first argument.
 * Used internally for validation — inputParams, outputParams, and execute are checked manually.
 */
declare const CreateCustomToolBaseSchema: z.ZodObject<{
  name: z.ZodString;
  description: z.ZodString;
  /**
   * Composio toolkit slug that this tool extends (inherits auth from).
   * Must be a valid Composio toolkit slug (e.g. `'gmail'`, `'github'`, `'meta_ads'`).
   * The backend validates this against the toolkit catalog.
   * Leave empty for tools that don't need any Composio-managed authentication.
   */
  extendsToolkit: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
  name: string;
  description: string;
  extendsToolkit?: string | undefined;
}, {
  name: string;
  description: string;
  extendsToolkit?: string | undefined;
}>;
/** Options for creating a custom tool via `createCustomTool()`. */
type CreateCustomToolParams<T extends z.ZodType> = z.infer<typeof CreateCustomToolBaseSchema> & {
  /** Zod schema for input parameters */
  inputParams: T;
  /** Optional Zod schema for output parameters (sent to backend for documentation) */
  outputParams?: z.ZodType;
  /** The function that executes the tool */
  execute: CustomToolExecuteFn<T>;
};
/**
 * Custom tool definition returned from `createCustomTool()`.
 * Pass to `composio.create(userId, { experimental: { customTools: [...] } })` to bind to a session.
 */
interface CustomTool {
  readonly slug: string;
  readonly name: string;
  readonly description: string;
  /**
   * Composio toolkit slug that this tool extends (inherits auth from).
   * Must be a valid Composio toolkit slug. Validated by the backend.
   * Undefined means the tool doesn't need any Composio-managed authentication.
   */
  readonly extendsToolkit?: string;
  readonly inputSchema: Record<string, unknown>;
  /** JSON Schema representation of the output (for backend documentation) */
  readonly outputSchema?: Record<string, unknown>;
  /** @internal Original Zod schema — used for runtime input validation (defaults, coercions, transforms) */
  readonly inputParams: z.ZodType;
  /** Direct reference to the execute function — useful for testing */
  readonly execute: CustomToolExecuteFn<z.ZodType>;
}
/** Serialized tool definition sent to backend for search indexing. Uses official client type. */
type CustomToolDefinition = SessionCreateParams.Experimental.CustomTool;
/**
 * Zod schema for validating the string/scalar fields of createCustomToolkit() options.
 * Slug is validated separately as the first argument.
 */
declare const CreateCustomToolkitBaseSchema: z.ZodObject<{
  name: z.ZodString;
  description: z.ZodString;
}, "strip", z.ZodTypeAny, {
  name: string;
  description: string;
}, {
  name: string;
  description: string;
}>;
/** Options for creating a custom toolkit via `createCustomToolkit()`. */
type CreateCustomToolkitParams = z.infer<typeof CreateCustomToolkitBaseSchema> & {
  /** Tools to include in this toolkit. Must not have `extendsToolkit` set. */
  tools: CustomTool[];
};
/**
 * Custom toolkit definition returned from `createCustomToolkit()`.
 * Pass to `composio.create(userId, { experimental: { customToolkits: [...] } })`.
 */
interface CustomToolkit {
  readonly slug: string;
  readonly name: string;
  readonly description: string;
  readonly tools: readonly CustomTool[];
}
/** Serialized toolkit definition sent to backend. Uses official client type. */
type CustomToolkitDefinition = SessionCreateParams.Experimental.CustomToolkit;
/** @internal Entry in the per-session custom tools routing map. */
type CustomToolsMapEntry = {
  handle: CustomTool;
  /** @internal The final slug assigned by the prefixing rules (e.g. LOCAL_GREP, LOCAL_GMAIL_GET_EMAILS) */
  finalSlug: string;
  /** Resolved toolkit — from extendsToolkit, parent custom toolkit, or undefined for standalone */
  toolkit?: string;
};
/** @internal Lookup maps used by ToolRouterSession for routing custom tools. */
type CustomToolsMap = {
  /** Lookup by final slug (e.g. LOCAL_GET_USER_CONTEXT) — used for agent execution path */
  byFinalSlug: Map<string, CustomToolsMapEntry>;
  /** Lookup by original slug (e.g. GET_USER_CONTEXT) — used for programmatic session.execute() */
  byOriginalSlug: Map<string, CustomToolsMapEntry>;
  /** The original custom toolkits passed at session creation — used for session.customToolkits() */
  toolkits?: CustomToolkit[];
};
/** A custom tool as registered in a session, with its final resolved slug. */
interface RegisteredCustomTool {
  /** The final slug as registered with the backend (e.g. LOCAL_GREP, LOCAL_GMAIL_GET_EMAILS) */
  slug: string;
  name: string;
  description: string;
  /** Resolved toolkit — extendsToolkit value, custom toolkit slug, or undefined for standalone */
  toolkit?: string;
  inputSchema: Record<string, unknown>;
  outputSchema?: Record<string, unknown>;
}
/** A custom toolkit as registered in a session, with final slugs on nested tools. */
interface RegisteredCustomToolkit {
  slug: string;
  name: string;
  description: string;
  tools: RegisteredCustomTool[];
}
/** Custom tool as returned in the session create response (has prefixed slug + original_slug). */
type CustomToolResponse = SessionCreateResponse.Experimental.CustomTool;
/** Custom toolkit as returned in the session create response (has prefixed slugs + original_slugs). */
type CustomToolkitResponse = SessionCreateResponse.Experimental.CustomToolkit;
//#endregion
export { ToolRouterToolkitsFn as $, ToolRouterAuthorizeFn as A, ConnectedAccountListParamsSchema as At, ToolRouterManageConnectionsConfigSchema as B, ConnectedAccountStatusSchema as Bt, SessionContext as C, ToolRouterSessionFilesMountUploadOptions as Ct, SessionExperimental as D, ConnectedAccountAuthConfig as Dt, Session as E, ConnectionRequestState as Et, ToolRouterConfigToolsSchema as F, ConnectedAccountRefreshOptionsSchema as Ft, ToolRouterSessionProxyExecuteResponse as G, CreateConnectedAccountLinkResponseSchema as Gt, ToolRouterSessionExecuteResponse as H, CreateConnectedAccountLinkOptions as Ht, ToolRouterCreateSessionConfig as I, ConnectedAccountRetrieveResponse as It, ToolRouterSessionSearchResponseSchema as J, CreateConnectedAccountParams as Jt, ToolRouterSessionSearchFn as K, CreateConnectedAccountOptions as Kt, ToolRouterCreateSessionConfigSchema as L, ConnectedAccountRetrieveResponseSchema as Lt, ToolRouterConfigTags as M, ConnectedAccountListResponseItem as Mt, ToolRouterConfigTagsSchema as N, ConnectedAccountListResponseSchema as Nt, SessionProxyExecuteParams as O, ConnectedAccountAuthConfigSchema as Ot, ToolRouterConfigTools as P, ConnectedAccountRefreshOptions as Pt, ToolRouterToolkitsEnabledConfigSchema as Q, DefaultCreateConnectedAccountParamsSchema as Qt, ToolRouterMCPServerConfig as R, ConnectedAccountStatus as Rt, RegisteredCustomToolkit as S, ToolRouterSessionFilesMountListOptionsSchema as St, MCPServerTypeSchema as T, ConnectionRequest as Tt, ToolRouterSessionExecuteResponseSchema as U, CreateConnectedAccountLinkOptionsSchema as Ut, ToolRouterSessionExecuteFn as V, ConnectedAccountStatuses as Vt, ToolRouterSessionProxyExecuteFn as W, CreateConnectedAccountLinkResponse as Wt, ToolRouterTagsParamSchema as X, CreateConnectedAccountResponse as Xt, ToolRouterTagsEnableDisableSchema as Y, CreateConnectedAccountParamsSchema as Yt, ToolRouterToolkitsDisabledConfigSchema as Z, CreateConnectedAccountResponseSchema as Zt, CustomToolsMap as _, ToolRouterSessionFilesMountDeleteOptions as _t, CustomTool as a, ToolRouterToolsParamSchema as at, InputParamsSchema as b, ToolRouterSessionFilesMountDownloadOptionsSchema as bt, CustomToolInputParameter as c, ToolkitConnectionsDetails as ct, CustomToolRegistryItem as d, FileDeleteResponse as dt, ToolRouterToolkitsOptions as et, CustomToolResponse as f, FileDeleteResponseSchema as ft, CustomToolkitResponse as g, RemoteFileDataSchema as gt, CustomToolkitDefinition as h, RemoteFileData as ht, CreateCustomToolkitParams as i, ToolRouterToolsParam as it, ToolRouterConfigManageConnectionsSchema as j, ConnectedAccountListResponse as jt, SessionProxyExecuteParamsSchema as k, ConnectedAccountListParams as kt, CustomToolOptions as l, ToolkitConnectionsDetailsSchema as lt, CustomToolkit as m, FileListResponseSchema as mt, CreateCustomToolParams as n, ToolRouterToolkitsParamSchema as nt, CustomToolDefinition as o, ToolkitConnectionState as ot, CustomToolSlugSchema as p, FileListResponse as pt, ToolRouterSessionSearchResponse as q, CreateConnectedAccountOptionsSchema as qt, CreateCustomToolkitBaseSchema as r, ToolRouterToolsFn as rt, CustomToolExecuteFn as s, ToolkitConnectionStateSchema as st, CreateCustomToolBaseSchema as t, ToolRouterToolkitsOptionsSchema as tt, CustomToolRegistry as u, RemoteFile as ut, CustomToolsMapEntry as v, ToolRouterSessionFilesMountDeleteOptionsSchema as vt, MCPServerType as w, ToolRouterSessionFilesMountUploadOptionsSchema as wt, RegisteredCustomTool as x, ToolRouterSessionFilesMountListOptions as xt, ExecuteMetadata as y, ToolRouterSessionFilesMountDownloadOptions as yt, ToolRouterMCPServerConfigSchema as z, ConnectedAccountStatusEnum as zt };