/**
 * Generated by apps/api/scripts/generate-tool-contracts.ts.
 *
 * This structural snapshot lets browser code consume the API's typed tool
 * surface without importing server implementations. Regenerate it whenever a
 * builtin tool schema changes.
 */
export interface StudioToolIO {
  ORGANIZATION_CREATE: {
    input: { slug: string; name: string; description?: string | undefined };
    output: {
      id: string;
      name: string;
      slug: string;
      createdAt: string;
      logo?: string | null | undefined;
      metadata?: unknown;
      members?: unknown[] | undefined;
    };
  };
  ORGANIZATION_LIST: {
    input: { userId?: string | undefined };
    output: {
      organizations: {
        id: string;
        name: string;
        slug: string;
        createdAt: string;
        logo?: string | null | undefined;
        metadata?: unknown;
      }[];
    };
  };
  ORGANIZATION_GET: {
    input: { [x: string]: never };
    output: {
      id: string;
      name: string;
      slug: string;
      createdAt: string;
      logo?: string | null | undefined;
      metadata?: unknown;
      members?: unknown[] | undefined;
      invitations?: unknown[] | undefined;
    };
  };
  ORGANIZATION_UPDATE: {
    input: {
      id: string;
      name?: string | undefined;
      description?: string | undefined;
    };
    output: {
      id: string;
      name: string;
      slug: string;
      createdAt: string;
      logo?: string | null | undefined;
      metadata?: unknown;
    };
  };
  ORGANIZATION_DELETE: {
    input: { id: string };
    output: { success: boolean; id: string };
  };
  ORGANIZATION_SETTINGS_GET: {
    input: { [x: string]: never };
    output: {
      organizationId: string;
      sidebar_items?:
        | { title: string; url: string; icon: string }[]
        | null
        | undefined;
      enabled_plugins?: string[] | null | undefined;
      registry_config?:
        | {
            registries: Record<string, { enabled: boolean }>;
            blockedMcps: string[];
          }
        | null
        | undefined;
      simple_mode?:
        | {
            tiers: {
              fast: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              smart: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              thinking: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              image: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              web_search: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              deep_research: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
            };
          }
        | null
        | undefined;
      default_home_agents?: { ids: string[] } | null | undefined;
      flags?:
        | {
            demo_mode?: boolean | undefined;
            reports_only?: boolean | undefined;
            qa_agent_enabled?: boolean | undefined;
            code_reviewer_enabled?: boolean | undefined;
            auto_merge?: boolean | undefined;
            auto_assign_report_tasks_to_super_agent?: boolean | undefined;
          }
        | null
        | undefined;
      main_agent_id?: string | null | undefined;
      createdAt?: string | undefined;
      updatedAt?: string | undefined;
    };
  };
  ORGANIZATION_SETTINGS_UPDATE: {
    input: {
      organizationId: string;
      sidebar_items?:
        | { title: string; url: string; icon: string }[]
        | undefined;
      enabled_plugins?: string[] | undefined;
      registry_config?:
        | {
            registries: Record<string, { enabled: boolean }>;
            blockedMcps: string[];
          }
        | undefined;
      simple_mode?:
        | {
            tiers: {
              fast: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              smart: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              thinking: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              image: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              web_search: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              deep_research: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
            };
          }
        | undefined;
      default_home_agents?: { ids: string[] } | undefined;
      flags?:
        | {
            demo_mode?: boolean | undefined;
            reports_only?: boolean | undefined;
            qa_agent_enabled?: boolean | undefined;
            code_reviewer_enabled?: boolean | undefined;
            auto_merge?: boolean | undefined;
            auto_assign_report_tasks_to_super_agent?: boolean | undefined;
          }
        | undefined;
      main_agent_id?: string | null | undefined;
    };
    output: {
      organizationId: string;
      createdAt: string;
      updatedAt: string;
      sidebar_items?:
        | { title: string; url: string; icon: string }[]
        | null
        | undefined;
      enabled_plugins?: string[] | null | undefined;
      registry_config?:
        | {
            registries: Record<string, { enabled: boolean }>;
            blockedMcps: string[];
          }
        | null
        | undefined;
      simple_mode?:
        | {
            tiers: {
              fast: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              smart: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              thinking: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              image: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              web_search: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
              deep_research: {
                keyId: string;
                modelId: string;
                title?: string | undefined;
              } | null;
            };
          }
        | null
        | undefined;
      default_home_agents?: { ids: string[] } | null | undefined;
      flags?:
        | {
            demo_mode?: boolean | undefined;
            reports_only?: boolean | undefined;
            qa_agent_enabled?: boolean | undefined;
            code_reviewer_enabled?: boolean | undefined;
            auto_merge?: boolean | undefined;
            auto_assign_report_tasks_to_super_agent?: boolean | undefined;
          }
        | null
        | undefined;
      main_agent_id?: string | null | undefined;
    };
  };
  TASK_BOARD_ITEM_CREATE: {
    input: {
      title: string;
      description?: string | null | undefined;
      status?:
        | "done"
        | "triage"
        | "todo"
        | "in_progress"
        | "in_review"
        | undefined;
      priority?: "none" | "low" | "medium" | "high" | "urgent" | undefined;
      assigneeId?: string | null | undefined;
      dueDate?: string | null | undefined;
      tagIds?: string[] | undefined;
    };
    output: {
      item: {
        id: string;
        organizationId: string;
        title: string;
        description: string | null;
        status: "done" | "triage" | "todo" | "in_progress" | "in_review";
        priority: "none" | "low" | "medium" | "high" | "urgent";
        assigneeId: string | null;
        assignedBy: string | null;
        dueDate: string | null;
        sortOrder: number;
        threads: {
          threadId: string;
          virtualMcpId: string | null;
          status:
            | "in_progress"
            | "requires_action"
            | "failed"
            | "completed"
            | "expired"
            | null;
          title: string | null;
          lastMessage: string | null;
          hasPreview: boolean;
          hasMessages: boolean;
          createdAt: string;
        }[];
        tags: {
          id: string;
          name: string;
          color: string | null;
          createdBy: string;
          createdAt: string;
        }[];
        createdBy: string;
        createdAt: string;
        updatedBy: string;
        updatedAt: string;
      };
    };
  };
  TASK_BOARD_ITEM_LIST: {
    input: { [x: string]: never };
    output: {
      items: {
        id: string;
        organizationId: string;
        title: string;
        description: string | null;
        status: "done" | "triage" | "todo" | "in_progress" | "in_review";
        priority: "none" | "low" | "medium" | "high" | "urgent";
        assigneeId: string | null;
        assignedBy: string | null;
        dueDate: string | null;
        sortOrder: number;
        threads: {
          threadId: string;
          virtualMcpId: string | null;
          status:
            | "in_progress"
            | "requires_action"
            | "failed"
            | "completed"
            | "expired"
            | null;
          title: string | null;
          lastMessage: string | null;
          hasPreview: boolean;
          hasMessages: boolean;
          createdAt: string;
        }[];
        tags: {
          id: string;
          name: string;
          color: string | null;
          createdBy: string;
          createdAt: string;
        }[];
        createdBy: string;
        createdAt: string;
        updatedBy: string;
        updatedAt: string;
      }[];
    };
  };
  TASK_BOARD_ITEM_UPDATE: {
    input: {
      id: string;
      title?: string | undefined;
      description?: string | null | undefined;
      status?:
        | "done"
        | "triage"
        | "todo"
        | "in_progress"
        | "in_review"
        | undefined;
      priority?: "none" | "low" | "medium" | "high" | "urgent" | undefined;
      assigneeId?: string | null | undefined;
      dueDate?: string | null | undefined;
      sortOrder?: number | undefined;
      tagIds?: string[] | undefined;
      linkThreadId?: string | undefined;
    };
    output: {
      item: {
        id: string;
        organizationId: string;
        title: string;
        description: string | null;
        status: "done" | "triage" | "todo" | "in_progress" | "in_review";
        priority: "none" | "low" | "medium" | "high" | "urgent";
        assigneeId: string | null;
        assignedBy: string | null;
        dueDate: string | null;
        sortOrder: number;
        threads: {
          threadId: string;
          virtualMcpId: string | null;
          status:
            | "in_progress"
            | "requires_action"
            | "failed"
            | "completed"
            | "expired"
            | null;
          title: string | null;
          lastMessage: string | null;
          hasPreview: boolean;
          hasMessages: boolean;
          createdAt: string;
        }[];
        tags: {
          id: string;
          name: string;
          color: string | null;
          createdBy: string;
          createdAt: string;
        }[];
        createdBy: string;
        createdAt: string;
        updatedBy: string;
        updatedAt: string;
      };
    };
  };
  TASK_BOARD_ITEM_DELETE: {
    input: { id: string };
    output: { success: boolean };
  };
  TASK_BOARD_ITEM_PRS_GET: {
    input: { taskBoardItemId: string };
    output: {
      prs: {
        url: string;
        number: number;
        repoOwner: string;
        repoName: string;
        createdAt: string;
        title: string | null;
        body: string | null;
        state: "open" | "closed" | null;
        draft: boolean | null;
        merged: boolean | null;
        mergeable: boolean | null;
        checksStatus: "pending" | "passing" | "failing" | null;
        checks: {
          name: string;
          status: string;
          conclusion: string | null;
          detailsUrl: string | null;
          summary: string | null;
        }[];
        previewUrl: string | null;
      }[];
    };
  };
  TASK_BOARD_ITEM_PR_LINK: {
    input: { url: string };
    output: { url: string; prNumber: number; taskBoardItemIds: string[] };
  };
  TASK_BOARD_ITEM_RERUN: {
    input: { id: string };
    output: { status: string; supersededThreadIds: string[] };
  };
  TASK_BOARD_REVIEW_DECISION: {
    input: {
      taskBoardItemId: string;
      reviewer: "qa" | "code_review";
      decision: "approve" | "request_changes";
      notes: string;
      reviewToken?: string | undefined;
    };
    output: {
      status: "done" | "triage" | "todo" | "in_progress" | "in_review";
      merged: boolean;
    };
  };
  TASK_BOARD_PROMOTE_TO_PRODUCTION: {
    input: { taskBoardItemId: string };
    output: {
      status: "done" | "triage" | "todo" | "in_progress" | "in_review";
      merged: boolean;
    };
  };
  TASK_BOARD_ACTIVITY_LIST: {
    input: { taskBoardItemId: string };
    output: {
      activity: {
        id: string;
        taskBoardItemId: string;
        action:
          | "created"
          | "status_changed"
          | "assignee_changed"
          | "priority_changed"
          | "due_date_changed"
          | "title_changed"
          | "description_changed"
          | "tags_changed"
          | "review_requested"
          | "review_approved"
          | "review_changes_requested"
          | "merge_conflict_resolution";
        actorId: string | null;
        data: Record<string, unknown>;
        occurredAt: string;
      }[];
    };
  };
  TASK_BOARD_COMMENT_LIST: {
    input: { taskBoardItemId: string };
    output: {
      comments: {
        id: string;
        taskBoardItemId: string;
        parentId: string | null;
        authorId: string;
        body: string;
        resolved: boolean;
        createdAt: string;
        updatedAt: string;
      }[];
    };
  };
  TASK_BOARD_COMMENT_CREATE: {
    input: {
      taskBoardItemId: string;
      body: string;
      parentId?: string | null | undefined;
    };
    output: {
      comment: {
        id: string;
        taskBoardItemId: string;
        parentId: string | null;
        authorId: string;
        body: string;
        resolved: boolean;
        createdAt: string;
        updatedAt: string;
      };
    };
  };
  TASK_BOARD_COMMENT_UPDATE: {
    input: {
      id: string;
      body?: string | undefined;
      resolved?: boolean | undefined;
    };
    output: {
      comment: {
        id: string;
        taskBoardItemId: string;
        parentId: string | null;
        authorId: string;
        body: string;
        resolved: boolean;
        createdAt: string;
        updatedAt: string;
      };
    };
  };
  TASK_BOARD_COMMENT_DELETE: {
    input: { id: string };
    output: { success: boolean };
  };
  TASK_BOARD_DISMISSED_LIST: {
    input: { [x: string]: never };
    output: {
      findings: {
        externalKey: string;
        dismissedBy: string;
        dismissedAt: string;
      }[];
    };
  };
  TASK_BOARD_DISMISSED_RESTORE: {
    input: { externalKeys?: string[] | undefined };
    output: { restored: number };
  };
  TASK_ADD_REPO: {
    input: { connectionId?: string | undefined };
    output: {
      success: boolean;
      message: string;
      repositories?: { connectionId: string; repo: string }[] | undefined;
      repo?: string | undefined;
      cloned?: boolean | undefined;
      files?: string | undefined;
    };
  };
  BRAND_CONTEXT_LIST: {
    input: { includeArchived?: boolean | undefined };
    output: {
      items: {
        id: string;
        name: string;
        domain: string;
        overview: string;
        organizationId: string;
        createdAt: string;
        updatedAt: string;
        logo?: string | null | undefined;
        favicon?: string | null | undefined;
        ogImage?: string | null | undefined;
        fonts?:
          | {
              heading?: string | undefined;
              body?: string | undefined;
              code?: string | undefined;
            }
          | null
          | undefined;
        colors?:
          | {
              primary?: string | undefined;
              secondary?: string | undefined;
              accent?: string | undefined;
              background?: string | undefined;
              foreground?: string | undefined;
            }
          | null
          | undefined;
        images?: Record<string, unknown>[] | null | undefined;
        metadata?: Record<string, unknown> | null | undefined;
        isDefault?: boolean | undefined;
        archivedAt?: string | null | undefined;
      }[];
    };
  };
  BRAND_CONTEXT_GET: {
    input: { id: string };
    output: {
      id: string;
      name: string;
      domain: string;
      overview: string;
      createdAt: string;
      updatedAt: string;
      organizationId: string;
      logo?: string | null | undefined;
      favicon?: string | null | undefined;
      ogImage?: string | null | undefined;
      fonts?:
        | {
            heading?: string | undefined;
            body?: string | undefined;
            code?: string | undefined;
          }
        | null
        | undefined;
      colors?:
        | {
            primary?: string | undefined;
            secondary?: string | undefined;
            accent?: string | undefined;
            background?: string | undefined;
            foreground?: string | undefined;
          }
        | null
        | undefined;
      images?: Record<string, unknown>[] | null | undefined;
      metadata?: Record<string, unknown> | null | undefined;
      isDefault?: boolean | undefined;
      archivedAt?: string | null | undefined;
    };
  };
  BRAND_CONTEXT_CREATE: {
    input: {
      name: string;
      domain: string;
      overview: string;
      metadata?: Record<string, unknown> | null | undefined;
      logo?: string | null | undefined;
      favicon?: string | null | undefined;
      ogImage?: string | null | undefined;
      fonts?:
        | {
            heading?: string | undefined;
            body?: string | undefined;
            code?: string | undefined;
          }
        | null
        | undefined;
      colors?:
        | {
            primary?: string | undefined;
            secondary?: string | undefined;
            accent?: string | undefined;
            background?: string | undefined;
            foreground?: string | undefined;
          }
        | null
        | undefined;
      images?: Record<string, unknown>[] | null | undefined;
      archivedAt?: string | null | undefined;
      isDefault?: boolean | undefined;
    };
    output: {
      id: string;
      name: string;
      domain: string;
      overview: string;
      organizationId: string;
      createdAt: string;
      updatedAt: string;
      logo?: string | null | undefined;
      favicon?: string | null | undefined;
      ogImage?: string | null | undefined;
      fonts?:
        | {
            heading?: string | undefined;
            body?: string | undefined;
            code?: string | undefined;
          }
        | null
        | undefined;
      colors?:
        | {
            primary?: string | undefined;
            secondary?: string | undefined;
            accent?: string | undefined;
            background?: string | undefined;
            foreground?: string | undefined;
          }
        | null
        | undefined;
      images?: Record<string, unknown>[] | null | undefined;
      metadata?: Record<string, unknown> | null | undefined;
      archivedAt?: string | null | undefined;
      isDefault?: boolean | undefined;
    };
  };
  BRAND_CONTEXT_UPDATE: {
    input: {
      id: string;
      name?: string | undefined;
      domain?: string | undefined;
      overview?: string | undefined;
      logo?: string | null | undefined;
      favicon?: string | null | undefined;
      ogImage?: string | null | undefined;
      fonts?:
        | {
            heading?: string | undefined;
            body?: string | undefined;
            code?: string | undefined;
          }
        | null
        | undefined;
      colors?:
        | {
            primary?: string | undefined;
            secondary?: string | undefined;
            accent?: string | undefined;
            background?: string | undefined;
            foreground?: string | undefined;
          }
        | null
        | undefined;
      images?: Record<string, unknown>[] | null | undefined;
      metadata?: Record<string, unknown> | null | undefined;
      archivedAt?: string | null | undefined;
      isDefault?: boolean | undefined;
    };
    output: {
      id: string;
      name: string;
      domain: string;
      overview: string;
      organizationId: string;
      createdAt: string;
      updatedAt: string;
      logo?: string | null | undefined;
      favicon?: string | null | undefined;
      ogImage?: string | null | undefined;
      fonts?:
        | {
            heading?: string | undefined;
            body?: string | undefined;
            code?: string | undefined;
          }
        | null
        | undefined;
      colors?:
        | {
            primary?: string | undefined;
            secondary?: string | undefined;
            accent?: string | undefined;
            background?: string | undefined;
            foreground?: string | undefined;
          }
        | null
        | undefined;
      images?: Record<string, unknown>[] | null | undefined;
      metadata?: Record<string, unknown> | null | undefined;
      archivedAt?: string | null | undefined;
      isDefault?: boolean | undefined;
    };
  };
  BRAND_CONTEXT_DELETE: { input: { id: string }; output: { success: boolean } };
  BRAND_CONTEXT_EXTRACT: {
    input: { domain: string; brandId?: string | undefined };
    output: {
      id: string;
      name: string;
      domain: string;
      overview: string;
      success: boolean;
      logo?: string | null | undefined;
      favicon?: string | null | undefined;
      ogImage?: string | null | undefined;
      fonts?:
        | {
            heading?: string | undefined;
            body?: string | undefined;
            code?: string | undefined;
          }
        | null
        | undefined;
      colors?:
        | {
            primary?: string | undefined;
            secondary?: string | undefined;
            accent?: string | undefined;
            background?: string | undefined;
            foreground?: string | undefined;
          }
        | null
        | undefined;
    };
  };
  BRAND_GET: {
    input: { id?: string | undefined };
    output: {
      id: string;
      name: string;
      domain?: string | undefined;
      colors?:
        | {
            primary?: string | undefined;
            secondary?: string | undefined;
            accent?: string | undefined;
            background?: string | undefined;
            foreground?: string | undefined;
          }
        | undefined;
      fonts?:
        | {
            heading?: string | undefined;
            body?: string | undefined;
            code?: string | undefined;
          }
        | undefined;
      assets?:
        | {
            logo?: string | undefined;
            favicon?: string | undefined;
            ogImage?: string | undefined;
          }
        | undefined;
      overview?: string | undefined;
      tagline?: string | undefined;
      tone?: string | undefined;
      metadata?: Record<string, unknown> | undefined;
    };
  };
  BRAND_LIST: {
    input: { [x: string]: never };
    output: {
      items: {
        id: string;
        name: string;
        domain?: string | undefined;
        colors?:
          | {
              primary?: string | undefined;
              secondary?: string | undefined;
              accent?: string | undefined;
              background?: string | undefined;
              foreground?: string | undefined;
            }
          | undefined;
        fonts?:
          | {
              heading?: string | undefined;
              body?: string | undefined;
              code?: string | undefined;
            }
          | undefined;
        assets?:
          | {
              logo?: string | undefined;
              favicon?: string | undefined;
              ogImage?: string | undefined;
            }
          | undefined;
        overview?: string | undefined;
        tagline?: string | undefined;
        tone?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
      }[];
    };
  };
  ORGANIZATION_DOMAIN_LIST: {
    input: { [x: string]: never };
    output: {
      domains: {
        id: string;
        domain: string;
        joinMode: "request" | "off" | "auto";
        verificationStatus: "pending" | "verified";
        verificationMethod: "email" | "dns" | null;
        verifiedAt: string | null;
        recordName: string | null;
        recordValue: string | null;
      }[];
    };
  };
  ORGANIZATION_DOMAIN_ADD: {
    input: {
      domain: string;
      joinMode?: "request" | "off" | "auto" | undefined;
    };
    output: {
      id: string;
      domain: string;
      joinMode: "request" | "off" | "auto";
      verificationStatus: "pending" | "verified";
      verificationMethod: "email" | "dns" | null;
      verifiedAt: string | null;
      recordName: string | null;
      recordValue: string | null;
    };
  };
  ORGANIZATION_DOMAIN_UPDATE: {
    input: { id: string; joinMode: "request" | "off" | "auto" };
    output: {
      id: string;
      domain: string;
      joinMode: "request" | "off" | "auto";
      verificationStatus: "pending" | "verified";
      verificationMethod: "email" | "dns" | null;
      verifiedAt: string | null;
      recordName: string | null;
      recordValue: string | null;
    };
  };
  ORGANIZATION_DOMAIN_VERIFY: {
    input: { id: string };
    output: {
      verified: boolean;
      domain: {
        id: string;
        domain: string;
        joinMode: "request" | "off" | "auto";
        verificationStatus: "pending" | "verified";
        verificationMethod: "email" | "dns" | null;
        verifiedAt: string | null;
        recordName: string | null;
        recordValue: string | null;
      };
    };
  };
  ORGANIZATION_DOMAIN_REMOVE: {
    input: { id: string };
    output: { success: boolean };
  };
  ORGANIZATION_JOIN_REQUEST_LIST: {
    input: { [x: string]: never };
    output: {
      requests: {
        id: string;
        userId: string;
        status: "pending" | "approved" | "denied";
        createdAt: string;
        user: {
          id: string;
          name: string;
          email: string;
          image: string | null;
        } | null;
      }[];
    };
  };
  ORGANIZATION_JOIN_REQUEST_APPROVE: {
    input: { requestId: string };
    output: { success: boolean };
  };
  ORGANIZATION_JOIN_REQUEST_DENY: {
    input: { requestId: string };
    output: { success: boolean };
  };
  ORGANIZATION_MEMBER_ADD: {
    input: {
      userId: string;
      role: string[];
      organizationId?: string | undefined;
    };
    output: {
      id: string;
      organizationId: string;
      userId: string;
      role: string | string[];
      createdAt: string;
    };
  };
  ORGANIZATION_MEMBER_REMOVE: {
    input: { memberIdOrEmail: string; organizationId?: string | undefined };
    output: { success: boolean; memberIdOrEmail: string };
  };
  ORGANIZATION_MEMBER_LIST: {
    input: { limit?: number | undefined; offset?: number | undefined };
    output: {
      members: {
        id: string;
        organizationId: string;
        userId: string;
        role: string;
        createdAt: string;
        user?:
          | {
              id: string;
              name: string;
              email: string;
              image?: string | undefined;
            }
          | undefined;
      }[];
    };
  };
  ORGANIZATION_MEMBER_UPDATE_ROLE: {
    input: {
      memberId: string;
      role: string[];
      organizationId?: string | undefined;
    };
    output: {
      id: string;
      organizationId: string;
      userId: string;
      role: string | string[];
      createdAt: string;
      user: { email: string; name: string; image?: string | undefined };
    };
  };
  ORGANIZATION_BILLING_CHECKOUT_START: {
    input: { [x: string]: never };
    output: { url: string };
  };
  ORGANIZATION_BILLING_PORTAL: {
    input: { [x: string]: never };
    output: { url: string };
  };
  ORGANIZATION_TASK_QUOTA_GET: {
    input: { [x: string]: never };
    output: {
      enforced: boolean;
      billingStatus: string;
      subscribed: boolean;
      hasBillingAccount: boolean;
      used: number;
      limit: number;
      currentPeriodEnd: string | null;
    };
  };
  COLLECTION_CONNECTIONS_CREATE: {
    input: {
      data: {
        title: string;
        connection_type: "HTTP" | "SSE" | "Websocket" | "STDIO" | "VIRTUAL";
        metadata?: Record<string, unknown> | null | undefined;
        id?: string | undefined;
        description?: string | null | undefined;
        slug?: string | null | undefined;
        app_name?: string | null | undefined;
        app_id?: string | null | undefined;
        connection_url?: string | null | undefined;
        connection_token?: string | null | undefined;
        connection_headers?:
          | {
              command: string;
              args?: string[] | undefined;
              cwd?: string | undefined;
              envVars?: Record<string, string> | undefined;
            }
          | { headers?: Record<string, string> | undefined }
          | null
          | undefined;
        oauth_config?:
          | {
              authorizationEndpoint: string;
              tokenEndpoint: string;
              clientId: string;
              scopes: string[];
              grantType: "authorization_code" | "client_credentials";
              introspectionEndpoint?: string | undefined;
              clientSecret?: string | undefined;
            }
          | null
          | undefined;
        configuration_state?: Record<string, unknown> | null | undefined;
        configuration_scopes?: string[] | null | undefined;
        icon?: string | null | undefined;
      };
    };
    output: {
      item: {
        id: string;
        title: string;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        description: string | null;
        icon: string | null;
        app_name: string | null;
        app_id: string | null;
        connection_type: "HTTP" | "SSE" | "Websocket" | "STDIO" | "VIRTUAL";
        connection_url: string | null;
        connection_token: string | null;
        connection_headers:
          | {
              command: string;
              args?: string[] | undefined;
              cwd?: string | undefined;
              envVars?: Record<string, string> | undefined;
            }
          | { headers?: Record<string, string> | undefined }
          | null;
        oauth_config: {
          authorizationEndpoint: string;
          tokenEndpoint: string;
          clientId: string;
          scopes: string[];
          grantType: "authorization_code" | "client_credentials";
          introspectionEndpoint?: string | undefined;
          clientSecret?: string | undefined;
        } | null;
        configuration_state: Record<string, unknown> | null;
        metadata: Record<string, unknown> | null;
        tools:
          | {
              name: string;
              inputSchema: {
                [x: string]: unknown;
                type: "object";
                properties?: Record<string, unknown> | undefined;
                required?: string[] | undefined;
              };
              description?: string | undefined;
              annotations?:
                | {
                    title?: string | undefined;
                    readOnlyHint?: boolean | undefined;
                    destructiveHint?: boolean | undefined;
                    idempotentHint?: boolean | undefined;
                    openWorldHint?: boolean | undefined;
                  }
                | undefined;
              execution?:
                | {
                    taskSupport?:
                      | "optional"
                      | "required"
                      | "forbidden"
                      | undefined;
                  }
                | undefined;
              _meta?: Record<string, unknown> | undefined;
              icons?:
                | {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                  }[]
                | undefined;
              title?: string | undefined;
              outputSchema?:
                | {
                    [x: string]: unknown;
                    type: "object";
                    properties?: Record<string, unknown> | undefined;
                    required?: string[] | undefined;
                  }
                | undefined;
            }[]
          | null;
        bindings: string[] | null;
        status: "error" | "active" | "inactive";
        updated_by?: string | undefined;
        slug?: string | null | undefined;
        configuration_scopes?: string[] | null | undefined;
      };
    };
  };
  COLLECTION_CONNECTIONS_LIST: {
    input: {
      where?: unknown;
      orderBy?:
        | {
            field: string[];
            direction: "asc" | "desc";
            nulls?: "first" | "last" | undefined;
          }[]
        | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
      binding?:
        | string
        | { [x: string]: unknown }[]
        | { [x: string]: unknown }
        | undefined;
      include_virtual?: boolean | undefined;
      slug?: string | undefined;
    };
    output: {
      items: {
        id: string;
        title: string;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        description: string | null;
        icon: string | null;
        app_name: string | null;
        app_id: string | null;
        connection_type: "HTTP" | "SSE" | "Websocket" | "STDIO" | "VIRTUAL";
        connection_url: string | null;
        connection_token: string | null;
        connection_headers:
          | {
              command: string;
              args?: string[] | undefined;
              cwd?: string | undefined;
              envVars?: Record<string, string> | undefined;
            }
          | { headers?: Record<string, string> | undefined }
          | null;
        oauth_config: {
          authorizationEndpoint: string;
          tokenEndpoint: string;
          clientId: string;
          scopes: string[];
          grantType: "authorization_code" | "client_credentials";
          introspectionEndpoint?: string | undefined;
          clientSecret?: string | undefined;
        } | null;
        configuration_state: Record<string, unknown> | null;
        metadata: Record<string, unknown> | null;
        tools:
          | {
              name: string;
              inputSchema: {
                [x: string]: unknown;
                type: "object";
                properties?: Record<string, unknown> | undefined;
                required?: string[] | undefined;
              };
              description?: string | undefined;
              annotations?:
                | {
                    title?: string | undefined;
                    readOnlyHint?: boolean | undefined;
                    destructiveHint?: boolean | undefined;
                    idempotentHint?: boolean | undefined;
                    openWorldHint?: boolean | undefined;
                  }
                | undefined;
              execution?:
                | {
                    taskSupport?:
                      | "optional"
                      | "required"
                      | "forbidden"
                      | undefined;
                  }
                | undefined;
              _meta?: Record<string, unknown> | undefined;
              icons?:
                | {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                  }[]
                | undefined;
              title?: string | undefined;
              outputSchema?:
                | {
                    [x: string]: unknown;
                    type: "object";
                    properties?: Record<string, unknown> | undefined;
                    required?: string[] | undefined;
                  }
                | undefined;
            }[]
          | null;
        bindings: string[] | null;
        status: "error" | "active" | "inactive";
        updated_by?: string | undefined;
        slug?: string | null | undefined;
        configuration_scopes?: string[] | null | undefined;
      }[];
      totalCount?: number | undefined;
      hasMore?: boolean | undefined;
    };
  };
  COLLECTION_CONNECTIONS_GET: {
    input: { id: string };
    output: {
      item: {
        id: string;
        title: string;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        description: string | null;
        icon: string | null;
        app_name: string | null;
        app_id: string | null;
        connection_type: "HTTP" | "SSE" | "Websocket" | "STDIO" | "VIRTUAL";
        connection_url: string | null;
        connection_token: string | null;
        connection_headers:
          | {
              command: string;
              args?: string[] | undefined;
              cwd?: string | undefined;
              envVars?: Record<string, string> | undefined;
            }
          | { headers?: Record<string, string> | undefined }
          | null;
        oauth_config: {
          authorizationEndpoint: string;
          tokenEndpoint: string;
          clientId: string;
          scopes: string[];
          grantType: "authorization_code" | "client_credentials";
          introspectionEndpoint?: string | undefined;
          clientSecret?: string | undefined;
        } | null;
        configuration_state: Record<string, unknown> | null;
        metadata: Record<string, unknown> | null;
        tools:
          | {
              name: string;
              inputSchema: {
                [x: string]: unknown;
                type: "object";
                properties?: Record<string, unknown> | undefined;
                required?: string[] | undefined;
              };
              description?: string | undefined;
              annotations?:
                | {
                    title?: string | undefined;
                    readOnlyHint?: boolean | undefined;
                    destructiveHint?: boolean | undefined;
                    idempotentHint?: boolean | undefined;
                    openWorldHint?: boolean | undefined;
                  }
                | undefined;
              execution?:
                | {
                    taskSupport?:
                      | "optional"
                      | "required"
                      | "forbidden"
                      | undefined;
                  }
                | undefined;
              _meta?: Record<string, unknown> | undefined;
              icons?:
                | {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                  }[]
                | undefined;
              title?: string | undefined;
              outputSchema?:
                | {
                    [x: string]: unknown;
                    type: "object";
                    properties?: Record<string, unknown> | undefined;
                    required?: string[] | undefined;
                  }
                | undefined;
            }[]
          | null;
        bindings: string[] | null;
        status: "error" | "active" | "inactive";
        updated_by?: string | undefined;
        slug?: string | null | undefined;
        configuration_scopes?: string[] | null | undefined;
      } | null;
    };
  };
  COLLECTION_CONNECTIONS_UPDATE: {
    input: {
      id: string;
      data: {
        id?: string | undefined;
        title?: string | undefined;
        created_at?: string | undefined;
        updated_at?: string | undefined;
        created_by?: string | undefined;
        updated_by?: string | undefined;
        organization_id?: string | undefined;
        description?: string | null | undefined;
        icon?: string | null | undefined;
        app_name?: string | null | undefined;
        app_id?: string | null | undefined;
        slug?: string | null | undefined;
        connection_type?:
          | "HTTP"
          | "SSE"
          | "Websocket"
          | "STDIO"
          | "VIRTUAL"
          | undefined;
        connection_url?: string | null | undefined;
        connection_token?: string | null | undefined;
        connection_headers?:
          | {
              command: string;
              args?: string[] | undefined;
              cwd?: string | undefined;
              envVars?: Record<string, string> | undefined;
            }
          | { headers?: Record<string, string> | undefined }
          | null
          | undefined;
        oauth_config?:
          | {
              authorizationEndpoint: string;
              tokenEndpoint: string;
              clientId: string;
              scopes: string[];
              grantType: "authorization_code" | "client_credentials";
              introspectionEndpoint?: string | undefined;
              clientSecret?: string | undefined;
            }
          | null
          | undefined;
        configuration_state?: Record<string, unknown> | null | undefined;
        configuration_scopes?: string[] | null | undefined;
        metadata?: Record<string, unknown> | null | undefined;
        tools?:
          | {
              name: string;
              inputSchema: {
                [x: string]: unknown;
                type: "object";
                properties?: Record<string, unknown> | undefined;
                required?: string[] | undefined;
              };
              description?: string | undefined;
              annotations?:
                | {
                    title?: string | undefined;
                    readOnlyHint?: boolean | undefined;
                    destructiveHint?: boolean | undefined;
                    idempotentHint?: boolean | undefined;
                    openWorldHint?: boolean | undefined;
                  }
                | undefined;
              execution?:
                | {
                    taskSupport?:
                      | "optional"
                      | "required"
                      | "forbidden"
                      | undefined;
                  }
                | undefined;
              _meta?: Record<string, unknown> | undefined;
              icons?:
                | {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                  }[]
                | undefined;
              title?: string | undefined;
              outputSchema?:
                | {
                    [x: string]: unknown;
                    type: "object";
                    properties?: Record<string, unknown> | undefined;
                    required?: string[] | undefined;
                  }
                | undefined;
            }[]
          | null
          | undefined;
        bindings?: string[] | null | undefined;
        status?: "error" | "active" | "inactive" | undefined;
      };
    };
    output: {
      item: {
        id: string;
        title: string;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        description: string | null;
        icon: string | null;
        app_name: string | null;
        app_id: string | null;
        connection_type: "HTTP" | "SSE" | "Websocket" | "STDIO" | "VIRTUAL";
        connection_url: string | null;
        connection_token: string | null;
        connection_headers:
          | {
              command: string;
              args?: string[] | undefined;
              cwd?: string | undefined;
              envVars?: Record<string, string> | undefined;
            }
          | { headers?: Record<string, string> | undefined }
          | null;
        oauth_config: {
          authorizationEndpoint: string;
          tokenEndpoint: string;
          clientId: string;
          scopes: string[];
          grantType: "authorization_code" | "client_credentials";
          introspectionEndpoint?: string | undefined;
          clientSecret?: string | undefined;
        } | null;
        configuration_state: Record<string, unknown> | null;
        metadata: Record<string, unknown> | null;
        tools:
          | {
              name: string;
              inputSchema: {
                [x: string]: unknown;
                type: "object";
                properties?: Record<string, unknown> | undefined;
                required?: string[] | undefined;
              };
              description?: string | undefined;
              annotations?:
                | {
                    title?: string | undefined;
                    readOnlyHint?: boolean | undefined;
                    destructiveHint?: boolean | undefined;
                    idempotentHint?: boolean | undefined;
                    openWorldHint?: boolean | undefined;
                  }
                | undefined;
              execution?:
                | {
                    taskSupport?:
                      | "optional"
                      | "required"
                      | "forbidden"
                      | undefined;
                  }
                | undefined;
              _meta?: Record<string, unknown> | undefined;
              icons?:
                | {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                  }[]
                | undefined;
              title?: string | undefined;
              outputSchema?:
                | {
                    [x: string]: unknown;
                    type: "object";
                    properties?: Record<string, unknown> | undefined;
                    required?: string[] | undefined;
                  }
                | undefined;
            }[]
          | null;
        bindings: string[] | null;
        status: "error" | "active" | "inactive";
        updated_by?: string | undefined;
        slug?: string | null | undefined;
        configuration_scopes?: string[] | null | undefined;
      };
    };
  };
  COLLECTION_CONNECTIONS_DELETE: {
    input: { id: string; force?: boolean | undefined };
    output: {
      item: {
        id: string;
        title: string;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        description: string | null;
        icon: string | null;
        app_name: string | null;
        app_id: string | null;
        connection_type: "HTTP" | "SSE" | "Websocket" | "STDIO" | "VIRTUAL";
        connection_url: string | null;
        connection_token: string | null;
        connection_headers:
          | {
              command: string;
              args?: string[] | undefined;
              cwd?: string | undefined;
              envVars?: Record<string, string> | undefined;
            }
          | { headers?: Record<string, string> | undefined }
          | null;
        oauth_config: {
          authorizationEndpoint: string;
          tokenEndpoint: string;
          clientId: string;
          scopes: string[];
          grantType: "authorization_code" | "client_credentials";
          introspectionEndpoint?: string | undefined;
          clientSecret?: string | undefined;
        } | null;
        configuration_state: Record<string, unknown> | null;
        metadata: Record<string, unknown> | null;
        tools:
          | {
              name: string;
              inputSchema: {
                [x: string]: unknown;
                type: "object";
                properties?: Record<string, unknown> | undefined;
                required?: string[] | undefined;
              };
              description?: string | undefined;
              annotations?:
                | {
                    title?: string | undefined;
                    readOnlyHint?: boolean | undefined;
                    destructiveHint?: boolean | undefined;
                    idempotentHint?: boolean | undefined;
                    openWorldHint?: boolean | undefined;
                  }
                | undefined;
              execution?:
                | {
                    taskSupport?:
                      | "optional"
                      | "required"
                      | "forbidden"
                      | undefined;
                  }
                | undefined;
              _meta?: Record<string, unknown> | undefined;
              icons?:
                | {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                  }[]
                | undefined;
              title?: string | undefined;
              outputSchema?:
                | {
                    [x: string]: unknown;
                    type: "object";
                    properties?: Record<string, unknown> | undefined;
                    required?: string[] | undefined;
                  }
                | undefined;
            }[]
          | null;
        bindings: string[] | null;
        status: "error" | "active" | "inactive";
        updated_by?: string | undefined;
        slug?: string | null | undefined;
        configuration_scopes?: string[] | null | undefined;
      };
    };
  };
  CONNECTION_TEST: {
    input: { id: string };
    output: { id: string; healthy: boolean; latencyMs: number };
  };
  COMMERCE_DISCOVERY_SETUP: {
    input: { siteUrl: string };
    output: {
      connection: {
        id: string;
        title: string;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        description: string | null;
        icon: string | null;
        app_name: string | null;
        app_id: string | null;
        connection_type: "HTTP" | "SSE" | "Websocket" | "STDIO" | "VIRTUAL";
        connection_url: string | null;
        connection_token: string | null;
        connection_headers:
          | {
              command: string;
              args?: string[] | undefined;
              cwd?: string | undefined;
              envVars?: Record<string, string> | undefined;
            }
          | { headers?: Record<string, string> | undefined }
          | null;
        oauth_config: {
          authorizationEndpoint: string;
          tokenEndpoint: string;
          clientId: string;
          scopes: string[];
          grantType: "authorization_code" | "client_credentials";
          introspectionEndpoint?: string | undefined;
          clientSecret?: string | undefined;
        } | null;
        configuration_state: Record<string, unknown> | null;
        metadata: Record<string, unknown> | null;
        tools:
          | {
              name: string;
              inputSchema: {
                [x: string]: unknown;
                type: "object";
                properties?: Record<string, unknown> | undefined;
                required?: string[] | undefined;
              };
              description?: string | undefined;
              annotations?:
                | {
                    title?: string | undefined;
                    readOnlyHint?: boolean | undefined;
                    destructiveHint?: boolean | undefined;
                    idempotentHint?: boolean | undefined;
                    openWorldHint?: boolean | undefined;
                  }
                | undefined;
              execution?:
                | {
                    taskSupport?:
                      | "optional"
                      | "required"
                      | "forbidden"
                      | undefined;
                  }
                | undefined;
              _meta?: Record<string, unknown> | undefined;
              icons?:
                | {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                  }[]
                | undefined;
              title?: string | undefined;
              outputSchema?:
                | {
                    [x: string]: unknown;
                    type: "object";
                    properties?: Record<string, unknown> | undefined;
                    required?: string[] | undefined;
                  }
                | undefined;
            }[]
          | null;
        bindings: string[] | null;
        status: "error" | "active" | "inactive";
        updated_by?: string | undefined;
        slug?: string | null | undefined;
        configuration_scopes?: string[] | null | undefined;
      };
      virtualMcp: {
        id: string;
        title: string;
        description: string | null;
        icon: string | null;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        status: "active" | "inactive";
        pinned: boolean;
        metadata: {
          [x: string]: unknown;
          instructions: string | null;
          enabled_plugins?: string[] | null | undefined;
          subAgents?: string[] | null | undefined;
          liveAgentId?: string | null | undefined;
          ui?:
            | {
                banner?: string | null | undefined;
                bannerColor?: string | null | undefined;
                icon?: string | null | undefined;
                themeColor?: string | null | undefined;
                pinnedViews?:
                  | {
                      connectionId: string;
                      toolName: string;
                      label: string;
                      icon?: string | null | undefined;
                    }[]
                  | null
                  | undefined;
                layout?:
                  | {
                      defaultMainView?:
                        | {
                            type: string;
                            id?: string | undefined;
                            toolName?: string | undefined;
                          }
                        | null
                        | undefined;
                      chatDefaultOpen?: boolean | null | undefined;
                      cmsDefaultOpen?: boolean | null | undefined;
                      tabs?:
                        | {
                            id: string;
                            title: string;
                            view: {
                              type: "ext-app";
                              appId: string;
                              args?: Record<string, unknown> | undefined;
                            };
                            icon?: string | undefined;
                          }[]
                        | undefined;
                    }
                  | null
                  | undefined;
                homeTile?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }
                  | null
                  | undefined;
                homeTiles?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }[]
                  | null
                  | undefined;
                homePrompts?: string[] | null | undefined;
              }
            | null
            | undefined;
          githubRepo?:
            | {
                url: string;
                owner: string;
                name: string;
                installationId?: number | undefined;
                connectionId?: string | undefined;
              }
            | null
            | undefined;
          runtime?:
            | {
                selected?: string | null | undefined;
                port?: string | null | undefined;
                path?: string | null | undefined;
                env?:
                  | (
                      | { key: string; kind: "literal"; value: string }
                      | { key: string; kind: "secret"; secretId: string }
                    )[]
                  | null
                  | undefined;
                submoduleCredentials?:
                  | { host: string; secretId: string }[]
                  | null
                  | undefined;
              }
            | null
            | undefined;
          sandboxMap?:
            | Record<
                string,
                Record<
                  string,
                  Record<
                    string,
                    {
                      sandboxHandle: string;
                      previewUrl: string | null;
                      sandboxApiUrl?: string | null | undefined;
                      sandboxProviderKind?:
                        | "agent-sandbox"
                        | "user-desktop"
                        | undefined;
                      createdAt?: number | undefined;
                      startedWith?:
                        | {
                            packageManager?: string | null | undefined;
                            port?: string | null | undefined;
                            path?: string | null | undefined;
                          }
                        | undefined;
                    }
                  >
                >
              >
            | undefined;
          knowledge?:
            | {
                id: string;
                name: string;
                volume: string;
                path: string;
                url: string;
                addedAt: string;
                kind?: "file" | "skill" | undefined;
                contentType?: string | null | undefined;
                size?: number | null | undefined;
              }[]
            | null
            | undefined;
          siteSlug?: string | null | undefined;
          publishPolicy?: "smart" | "open" | "code-review" | null | undefined;
          productionUrl?: string | null | undefined;
          fieldDescriptionTooltips?: boolean | null | undefined;
          fastPreview?: boolean | null | undefined;
          syncButtonEnabled?: boolean | null | undefined;
        };
        connections: {
          connection_id: string;
          selected_tools: string[] | null;
          selected_resources: string[] | null;
          selected_prompts: string[] | null;
        }[];
        updated_by?: string | undefined;
      };
      reportApp: {
        connectionId: string;
        virtualMcpId: string;
        toolName: "get_my_diagnostic";
      };
      created: { connection: boolean; virtualMcp: boolean };
    };
  };
  COMMERCE_DISCOVERY_RUN: {
    input: { siteUrl: string };
    output: { triggered: boolean; reason?: string | undefined };
  };
  COMMERCE_DISCOVERY_BIND: {
    input: { siteUrl: string; provider: "ga4" | "gsc"; resourceId: string };
    output:
      | { ok: true; resourceId: string; evidence: string }
      | { ok: false; reason: string; detail: string };
  };
  COMMERCE_DISCOVERY_CONNECTION_STATUS: {
    input: { siteUrl: string };
    output: {
      providers: Record<
        string,
        {
          connected: boolean;
          via: "oauth" | "sa" | null;
          resource: string | null;
        }
      >;
      claimed: boolean;
    };
  };
  COLLECTION_VIRTUAL_MCP_CREATE: {
    input: {
      data: {
        title: string;
        connections: {
          connection_id: string;
          selected_tools?: string[] | null | undefined;
          selected_resources?: string[] | null | undefined;
          selected_prompts?: string[] | null | undefined;
        }[];
        description?: string | null | undefined;
        icon?: string | null | undefined;
        status?: "active" | "inactive" | undefined;
        pinned?: boolean | undefined;
        metadata?:
          | {
              [x: string]: unknown;
              instructions?: string | null | undefined;
              enabled_plugins?: string[] | null | undefined;
              subAgents?: string[] | null | undefined;
              liveAgentId?: string | null | undefined;
              ui?:
                | {
                    banner?: string | null | undefined;
                    bannerColor?: string | null | undefined;
                    icon?: string | null | undefined;
                    themeColor?: string | null | undefined;
                    pinnedViews?:
                      | {
                          connectionId: string;
                          toolName: string;
                          label: string;
                          icon?: string | null | undefined;
                        }[]
                      | null
                      | undefined;
                    layout?:
                      | {
                          defaultMainView?:
                            | {
                                type: string;
                                id?: string | undefined;
                                toolName?: string | undefined;
                              }
                            | null
                            | undefined;
                          chatDefaultOpen?: boolean | null | undefined;
                          cmsDefaultOpen?: boolean | null | undefined;
                          tabs?:
                            | {
                                id: string;
                                title: string;
                                view: {
                                  type: "ext-app";
                                  appId: string;
                                  args?: Record<string, unknown> | undefined;
                                };
                                icon?: string | undefined;
                              }[]
                            | undefined;
                        }
                      | null
                      | undefined;
                    homeTile?:
                      | {
                          resourceUri: string;
                          tileId?: string | undefined;
                          connectionId?: string | undefined;
                          toolName?: string | undefined;
                          toolInput?: Record<string, unknown> | undefined;
                          minHeight?: number | undefined;
                          maxHeight?: number | undefined;
                        }
                      | null
                      | undefined;
                    homeTiles?:
                      | {
                          resourceUri: string;
                          tileId?: string | undefined;
                          connectionId?: string | undefined;
                          toolName?: string | undefined;
                          toolInput?: Record<string, unknown> | undefined;
                          minHeight?: number | undefined;
                          maxHeight?: number | undefined;
                        }[]
                      | null
                      | undefined;
                    homePrompts?: string[] | null | undefined;
                  }
                | null
                | undefined;
              githubRepo?:
                | {
                    url: string;
                    owner: string;
                    name: string;
                    installationId?: number | undefined;
                    connectionId?: string | undefined;
                  }
                | null
                | undefined;
              runtime?:
                | {
                    selected?: string | null | undefined;
                    port?: string | null | undefined;
                    path?: string | null | undefined;
                    env?:
                      | (
                          | { key: string; kind: "literal"; value: string }
                          | { key: string; kind: "secret"; secretId: string }
                        )[]
                      | null
                      | undefined;
                    submoduleCredentials?:
                      | { host: string; secretId: string }[]
                      | null
                      | undefined;
                  }
                | null
                | undefined;
              sandboxMap?:
                | Record<
                    string,
                    Record<
                      string,
                      Record<
                        string,
                        {
                          sandboxHandle: string;
                          previewUrl: string | null;
                          sandboxApiUrl?: string | null | undefined;
                          sandboxProviderKind?:
                            | "agent-sandbox"
                            | "user-desktop"
                            | undefined;
                          createdAt?: number | undefined;
                          startedWith?:
                            | {
                                packageManager?: string | null | undefined;
                                port?: string | null | undefined;
                                path?: string | null | undefined;
                              }
                            | undefined;
                        }
                      >
                    >
                  >
                | undefined;
              knowledge?:
                | {
                    id: string;
                    name: string;
                    volume: string;
                    path: string;
                    url: string;
                    addedAt: string;
                    kind?: "file" | "skill" | undefined;
                    contentType?: string | null | undefined;
                    size?: number | null | undefined;
                  }[]
                | null
                | undefined;
              siteSlug?: string | null | undefined;
              publishPolicy?:
                | "smart"
                | "open"
                | "code-review"
                | null
                | undefined;
              productionUrl?: string | null | undefined;
              fieldDescriptionTooltips?: boolean | null | undefined;
              fastPreview?: boolean | null | undefined;
              syncButtonEnabled?: boolean | null | undefined;
            }
          | null
          | undefined;
        prompts?:
          | { title: string; text: string; description?: string | undefined }[]
          | undefined;
      };
    };
    output: {
      item: {
        id: string;
        title: string;
        description: string | null;
        icon: string | null;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        status: "active" | "inactive";
        pinned: boolean;
        metadata: {
          [x: string]: unknown;
          instructions: string | null;
          enabled_plugins?: string[] | null | undefined;
          subAgents?: string[] | null | undefined;
          liveAgentId?: string | null | undefined;
          ui?:
            | {
                banner?: string | null | undefined;
                bannerColor?: string | null | undefined;
                icon?: string | null | undefined;
                themeColor?: string | null | undefined;
                pinnedViews?:
                  | {
                      connectionId: string;
                      toolName: string;
                      label: string;
                      icon?: string | null | undefined;
                    }[]
                  | null
                  | undefined;
                layout?:
                  | {
                      defaultMainView?:
                        | {
                            type: string;
                            id?: string | undefined;
                            toolName?: string | undefined;
                          }
                        | null
                        | undefined;
                      chatDefaultOpen?: boolean | null | undefined;
                      cmsDefaultOpen?: boolean | null | undefined;
                      tabs?:
                        | {
                            id: string;
                            title: string;
                            view: {
                              type: "ext-app";
                              appId: string;
                              args?: Record<string, unknown> | undefined;
                            };
                            icon?: string | undefined;
                          }[]
                        | undefined;
                    }
                  | null
                  | undefined;
                homeTile?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }
                  | null
                  | undefined;
                homeTiles?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }[]
                  | null
                  | undefined;
                homePrompts?: string[] | null | undefined;
              }
            | null
            | undefined;
          githubRepo?:
            | {
                url: string;
                owner: string;
                name: string;
                installationId?: number | undefined;
                connectionId?: string | undefined;
              }
            | null
            | undefined;
          runtime?:
            | {
                selected?: string | null | undefined;
                port?: string | null | undefined;
                path?: string | null | undefined;
                env?:
                  | (
                      | { key: string; kind: "literal"; value: string }
                      | { key: string; kind: "secret"; secretId: string }
                    )[]
                  | null
                  | undefined;
                submoduleCredentials?:
                  | { host: string; secretId: string }[]
                  | null
                  | undefined;
              }
            | null
            | undefined;
          sandboxMap?:
            | Record<
                string,
                Record<
                  string,
                  Record<
                    string,
                    {
                      sandboxHandle: string;
                      previewUrl: string | null;
                      sandboxApiUrl?: string | null | undefined;
                      sandboxProviderKind?:
                        | "agent-sandbox"
                        | "user-desktop"
                        | undefined;
                      createdAt?: number | undefined;
                      startedWith?:
                        | {
                            packageManager?: string | null | undefined;
                            port?: string | null | undefined;
                            path?: string | null | undefined;
                          }
                        | undefined;
                    }
                  >
                >
              >
            | undefined;
          knowledge?:
            | {
                id: string;
                name: string;
                volume: string;
                path: string;
                url: string;
                addedAt: string;
                kind?: "file" | "skill" | undefined;
                contentType?: string | null | undefined;
                size?: number | null | undefined;
              }[]
            | null
            | undefined;
          siteSlug?: string | null | undefined;
          publishPolicy?: "smart" | "open" | "code-review" | null | undefined;
          productionUrl?: string | null | undefined;
          fieldDescriptionTooltips?: boolean | null | undefined;
          fastPreview?: boolean | null | undefined;
          syncButtonEnabled?: boolean | null | undefined;
        };
        connections: {
          connection_id: string;
          selected_tools: string[] | null;
          selected_resources: string[] | null;
          selected_prompts: string[] | null;
        }[];
        updated_by?: string | undefined;
      };
    };
  };
  COLLECTION_VIRTUAL_MCP_LIST: {
    input: {
      where?: unknown;
      orderBy?:
        | {
            field: string[];
            direction: "asc" | "desc";
            nulls?: "first" | "last" | undefined;
          }[]
        | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
    };
    output: {
      items: {
        id: string;
        title: string;
        description: string | null;
        icon: string | null;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        status: "active" | "inactive";
        pinned: boolean;
        metadata: {
          [x: string]: unknown;
          instructions: string | null;
          enabled_plugins?: string[] | null | undefined;
          subAgents?: string[] | null | undefined;
          liveAgentId?: string | null | undefined;
          ui?:
            | {
                banner?: string | null | undefined;
                bannerColor?: string | null | undefined;
                icon?: string | null | undefined;
                themeColor?: string | null | undefined;
                pinnedViews?:
                  | {
                      connectionId: string;
                      toolName: string;
                      label: string;
                      icon?: string | null | undefined;
                    }[]
                  | null
                  | undefined;
                layout?:
                  | {
                      defaultMainView?:
                        | {
                            type: string;
                            id?: string | undefined;
                            toolName?: string | undefined;
                          }
                        | null
                        | undefined;
                      chatDefaultOpen?: boolean | null | undefined;
                      cmsDefaultOpen?: boolean | null | undefined;
                      tabs?:
                        | {
                            id: string;
                            title: string;
                            view: {
                              type: "ext-app";
                              appId: string;
                              args?: Record<string, unknown> | undefined;
                            };
                            icon?: string | undefined;
                          }[]
                        | undefined;
                    }
                  | null
                  | undefined;
                homeTile?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }
                  | null
                  | undefined;
                homeTiles?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }[]
                  | null
                  | undefined;
                homePrompts?: string[] | null | undefined;
              }
            | null
            | undefined;
          githubRepo?:
            | {
                url: string;
                owner: string;
                name: string;
                installationId?: number | undefined;
                connectionId?: string | undefined;
              }
            | null
            | undefined;
          runtime?:
            | {
                selected?: string | null | undefined;
                port?: string | null | undefined;
                path?: string | null | undefined;
                env?:
                  | (
                      | { key: string; kind: "literal"; value: string }
                      | { key: string; kind: "secret"; secretId: string }
                    )[]
                  | null
                  | undefined;
                submoduleCredentials?:
                  | { host: string; secretId: string }[]
                  | null
                  | undefined;
              }
            | null
            | undefined;
          sandboxMap?:
            | Record<
                string,
                Record<
                  string,
                  Record<
                    string,
                    {
                      sandboxHandle: string;
                      previewUrl: string | null;
                      sandboxApiUrl?: string | null | undefined;
                      sandboxProviderKind?:
                        | "agent-sandbox"
                        | "user-desktop"
                        | undefined;
                      createdAt?: number | undefined;
                      startedWith?:
                        | {
                            packageManager?: string | null | undefined;
                            port?: string | null | undefined;
                            path?: string | null | undefined;
                          }
                        | undefined;
                    }
                  >
                >
              >
            | undefined;
          knowledge?:
            | {
                id: string;
                name: string;
                volume: string;
                path: string;
                url: string;
                addedAt: string;
                kind?: "file" | "skill" | undefined;
                contentType?: string | null | undefined;
                size?: number | null | undefined;
              }[]
            | null
            | undefined;
          siteSlug?: string | null | undefined;
          publishPolicy?: "smart" | "open" | "code-review" | null | undefined;
          productionUrl?: string | null | undefined;
          fieldDescriptionTooltips?: boolean | null | undefined;
          fastPreview?: boolean | null | undefined;
          syncButtonEnabled?: boolean | null | undefined;
        };
        connections: {
          connection_id: string;
          selected_tools: string[] | null;
          selected_resources: string[] | null;
          selected_prompts: string[] | null;
        }[];
        updated_by?: string | undefined;
      }[];
      totalCount?: number | undefined;
      hasMore?: boolean | undefined;
    };
  };
  COLLECTION_VIRTUAL_MCP_GET: {
    input: { id: string };
    output: {
      item: {
        id: string;
        title: string;
        description: string | null;
        icon: string | null;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        status: "active" | "inactive";
        pinned: boolean;
        metadata: {
          [x: string]: unknown;
          instructions: string | null;
          enabled_plugins?: string[] | null | undefined;
          subAgents?: string[] | null | undefined;
          liveAgentId?: string | null | undefined;
          ui?:
            | {
                banner?: string | null | undefined;
                bannerColor?: string | null | undefined;
                icon?: string | null | undefined;
                themeColor?: string | null | undefined;
                pinnedViews?:
                  | {
                      connectionId: string;
                      toolName: string;
                      label: string;
                      icon?: string | null | undefined;
                    }[]
                  | null
                  | undefined;
                layout?:
                  | {
                      defaultMainView?:
                        | {
                            type: string;
                            id?: string | undefined;
                            toolName?: string | undefined;
                          }
                        | null
                        | undefined;
                      chatDefaultOpen?: boolean | null | undefined;
                      cmsDefaultOpen?: boolean | null | undefined;
                      tabs?:
                        | {
                            id: string;
                            title: string;
                            view: {
                              type: "ext-app";
                              appId: string;
                              args?: Record<string, unknown> | undefined;
                            };
                            icon?: string | undefined;
                          }[]
                        | undefined;
                    }
                  | null
                  | undefined;
                homeTile?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }
                  | null
                  | undefined;
                homeTiles?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }[]
                  | null
                  | undefined;
                homePrompts?: string[] | null | undefined;
              }
            | null
            | undefined;
          githubRepo?:
            | {
                url: string;
                owner: string;
                name: string;
                installationId?: number | undefined;
                connectionId?: string | undefined;
              }
            | null
            | undefined;
          runtime?:
            | {
                selected?: string | null | undefined;
                port?: string | null | undefined;
                path?: string | null | undefined;
                env?:
                  | (
                      | { key: string; kind: "literal"; value: string }
                      | { key: string; kind: "secret"; secretId: string }
                    )[]
                  | null
                  | undefined;
                submoduleCredentials?:
                  | { host: string; secretId: string }[]
                  | null
                  | undefined;
              }
            | null
            | undefined;
          sandboxMap?:
            | Record<
                string,
                Record<
                  string,
                  Record<
                    string,
                    {
                      sandboxHandle: string;
                      previewUrl: string | null;
                      sandboxApiUrl?: string | null | undefined;
                      sandboxProviderKind?:
                        | "agent-sandbox"
                        | "user-desktop"
                        | undefined;
                      createdAt?: number | undefined;
                      startedWith?:
                        | {
                            packageManager?: string | null | undefined;
                            port?: string | null | undefined;
                            path?: string | null | undefined;
                          }
                        | undefined;
                    }
                  >
                >
              >
            | undefined;
          knowledge?:
            | {
                id: string;
                name: string;
                volume: string;
                path: string;
                url: string;
                addedAt: string;
                kind?: "file" | "skill" | undefined;
                contentType?: string | null | undefined;
                size?: number | null | undefined;
              }[]
            | null
            | undefined;
          siteSlug?: string | null | undefined;
          publishPolicy?: "smart" | "open" | "code-review" | null | undefined;
          productionUrl?: string | null | undefined;
          fieldDescriptionTooltips?: boolean | null | undefined;
          fastPreview?: boolean | null | undefined;
          syncButtonEnabled?: boolean | null | undefined;
        };
        connections: {
          connection_id: string;
          selected_tools: string[] | null;
          selected_resources: string[] | null;
          selected_prompts: string[] | null;
        }[];
        updated_by?: string | undefined;
      } | null;
    };
  };
  COLLECTION_VIRTUAL_MCP_UPDATE: {
    input: {
      id: string;
      data: {
        title?: string | undefined;
        description?: string | null | undefined;
        icon?: string | null | undefined;
        status?: "active" | "inactive" | undefined;
        pinned?: boolean | undefined;
        metadata?:
          | {
              [x: string]: unknown;
              instructions?: string | null | undefined;
              enabled_plugins?: string[] | null | undefined;
              subAgents?: string[] | null | undefined;
              liveAgentId?: string | null | undefined;
              ui?:
                | {
                    banner?: string | null | undefined;
                    bannerColor?: string | null | undefined;
                    icon?: string | null | undefined;
                    themeColor?: string | null | undefined;
                    pinnedViews?:
                      | {
                          connectionId: string;
                          toolName: string;
                          label: string;
                          icon?: string | null | undefined;
                        }[]
                      | null
                      | undefined;
                    layout?:
                      | {
                          defaultMainView?:
                            | {
                                type: string;
                                id?: string | undefined;
                                toolName?: string | undefined;
                              }
                            | null
                            | undefined;
                          chatDefaultOpen?: boolean | null | undefined;
                          cmsDefaultOpen?: boolean | null | undefined;
                          tabs?:
                            | {
                                id: string;
                                title: string;
                                view: {
                                  type: "ext-app";
                                  appId: string;
                                  args?: Record<string, unknown> | undefined;
                                };
                                icon?: string | undefined;
                              }[]
                            | undefined;
                        }
                      | null
                      | undefined;
                    homeTile?:
                      | {
                          resourceUri: string;
                          tileId?: string | undefined;
                          connectionId?: string | undefined;
                          toolName?: string | undefined;
                          toolInput?: Record<string, unknown> | undefined;
                          minHeight?: number | undefined;
                          maxHeight?: number | undefined;
                        }
                      | null
                      | undefined;
                    homeTiles?:
                      | {
                          resourceUri: string;
                          tileId?: string | undefined;
                          connectionId?: string | undefined;
                          toolName?: string | undefined;
                          toolInput?: Record<string, unknown> | undefined;
                          minHeight?: number | undefined;
                          maxHeight?: number | undefined;
                        }[]
                      | null
                      | undefined;
                    homePrompts?: string[] | null | undefined;
                  }
                | null
                | undefined;
              githubRepo?:
                | {
                    url: string;
                    owner: string;
                    name: string;
                    installationId?: number | undefined;
                    connectionId?: string | undefined;
                  }
                | null
                | undefined;
              runtime?:
                | {
                    selected?: string | null | undefined;
                    port?: string | null | undefined;
                    path?: string | null | undefined;
                    env?:
                      | (
                          | { key: string; kind: "literal"; value: string }
                          | { key: string; kind: "secret"; secretId: string }
                        )[]
                      | null
                      | undefined;
                    submoduleCredentials?:
                      | { host: string; secretId: string }[]
                      | null
                      | undefined;
                  }
                | null
                | undefined;
              sandboxMap?:
                | Record<
                    string,
                    Record<
                      string,
                      Record<
                        string,
                        {
                          sandboxHandle: string;
                          previewUrl: string | null;
                          sandboxApiUrl?: string | null | undefined;
                          sandboxProviderKind?:
                            | "agent-sandbox"
                            | "user-desktop"
                            | undefined;
                          createdAt?: number | undefined;
                          startedWith?:
                            | {
                                packageManager?: string | null | undefined;
                                port?: string | null | undefined;
                                path?: string | null | undefined;
                              }
                            | undefined;
                        }
                      >
                    >
                  >
                | undefined;
              knowledge?:
                | {
                    id: string;
                    name: string;
                    volume: string;
                    path: string;
                    url: string;
                    addedAt: string;
                    kind?: "file" | "skill" | undefined;
                    contentType?: string | null | undefined;
                    size?: number | null | undefined;
                  }[]
                | null
                | undefined;
              siteSlug?: string | null | undefined;
              publishPolicy?:
                | "smart"
                | "open"
                | "code-review"
                | null
                | undefined;
              productionUrl?: string | null | undefined;
              fieldDescriptionTooltips?: boolean | null | undefined;
              fastPreview?: boolean | null | undefined;
              syncButtonEnabled?: boolean | null | undefined;
            }
          | null
          | undefined;
        connections?:
          | {
              connection_id: string;
              selected_tools?: string[] | null | undefined;
              selected_resources?: string[] | null | undefined;
              selected_prompts?: string[] | null | undefined;
            }[]
          | undefined;
        prompts?:
          | { title: string; text: string; description?: string | undefined }[]
          | undefined;
      };
    };
    output: {
      item: {
        id: string;
        title: string;
        description: string | null;
        icon: string | null;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        status: "active" | "inactive";
        pinned: boolean;
        metadata: {
          [x: string]: unknown;
          instructions: string | null;
          enabled_plugins?: string[] | null | undefined;
          subAgents?: string[] | null | undefined;
          liveAgentId?: string | null | undefined;
          ui?:
            | {
                banner?: string | null | undefined;
                bannerColor?: string | null | undefined;
                icon?: string | null | undefined;
                themeColor?: string | null | undefined;
                pinnedViews?:
                  | {
                      connectionId: string;
                      toolName: string;
                      label: string;
                      icon?: string | null | undefined;
                    }[]
                  | null
                  | undefined;
                layout?:
                  | {
                      defaultMainView?:
                        | {
                            type: string;
                            id?: string | undefined;
                            toolName?: string | undefined;
                          }
                        | null
                        | undefined;
                      chatDefaultOpen?: boolean | null | undefined;
                      cmsDefaultOpen?: boolean | null | undefined;
                      tabs?:
                        | {
                            id: string;
                            title: string;
                            view: {
                              type: "ext-app";
                              appId: string;
                              args?: Record<string, unknown> | undefined;
                            };
                            icon?: string | undefined;
                          }[]
                        | undefined;
                    }
                  | null
                  | undefined;
                homeTile?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }
                  | null
                  | undefined;
                homeTiles?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }[]
                  | null
                  | undefined;
                homePrompts?: string[] | null | undefined;
              }
            | null
            | undefined;
          githubRepo?:
            | {
                url: string;
                owner: string;
                name: string;
                installationId?: number | undefined;
                connectionId?: string | undefined;
              }
            | null
            | undefined;
          runtime?:
            | {
                selected?: string | null | undefined;
                port?: string | null | undefined;
                path?: string | null | undefined;
                env?:
                  | (
                      | { key: string; kind: "literal"; value: string }
                      | { key: string; kind: "secret"; secretId: string }
                    )[]
                  | null
                  | undefined;
                submoduleCredentials?:
                  | { host: string; secretId: string }[]
                  | null
                  | undefined;
              }
            | null
            | undefined;
          sandboxMap?:
            | Record<
                string,
                Record<
                  string,
                  Record<
                    string,
                    {
                      sandboxHandle: string;
                      previewUrl: string | null;
                      sandboxApiUrl?: string | null | undefined;
                      sandboxProviderKind?:
                        | "agent-sandbox"
                        | "user-desktop"
                        | undefined;
                      createdAt?: number | undefined;
                      startedWith?:
                        | {
                            packageManager?: string | null | undefined;
                            port?: string | null | undefined;
                            path?: string | null | undefined;
                          }
                        | undefined;
                    }
                  >
                >
              >
            | undefined;
          knowledge?:
            | {
                id: string;
                name: string;
                volume: string;
                path: string;
                url: string;
                addedAt: string;
                kind?: "file" | "skill" | undefined;
                contentType?: string | null | undefined;
                size?: number | null | undefined;
              }[]
            | null
            | undefined;
          siteSlug?: string | null | undefined;
          publishPolicy?: "smart" | "open" | "code-review" | null | undefined;
          productionUrl?: string | null | undefined;
          fieldDescriptionTooltips?: boolean | null | undefined;
          fastPreview?: boolean | null | undefined;
          syncButtonEnabled?: boolean | null | undefined;
        };
        connections: {
          connection_id: string;
          selected_tools: string[] | null;
          selected_resources: string[] | null;
          selected_prompts: string[] | null;
        }[];
        updated_by?: string | undefined;
      };
    };
  };
  COLLECTION_VIRTUAL_MCP_DELETE: {
    input: { id: string };
    output: {
      item: {
        id: string;
        title: string;
        description: string | null;
        icon: string | null;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        status: "active" | "inactive";
        pinned: boolean;
        metadata: {
          [x: string]: unknown;
          instructions: string | null;
          enabled_plugins?: string[] | null | undefined;
          subAgents?: string[] | null | undefined;
          liveAgentId?: string | null | undefined;
          ui?:
            | {
                banner?: string | null | undefined;
                bannerColor?: string | null | undefined;
                icon?: string | null | undefined;
                themeColor?: string | null | undefined;
                pinnedViews?:
                  | {
                      connectionId: string;
                      toolName: string;
                      label: string;
                      icon?: string | null | undefined;
                    }[]
                  | null
                  | undefined;
                layout?:
                  | {
                      defaultMainView?:
                        | {
                            type: string;
                            id?: string | undefined;
                            toolName?: string | undefined;
                          }
                        | null
                        | undefined;
                      chatDefaultOpen?: boolean | null | undefined;
                      cmsDefaultOpen?: boolean | null | undefined;
                      tabs?:
                        | {
                            id: string;
                            title: string;
                            view: {
                              type: "ext-app";
                              appId: string;
                              args?: Record<string, unknown> | undefined;
                            };
                            icon?: string | undefined;
                          }[]
                        | undefined;
                    }
                  | null
                  | undefined;
                homeTile?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }
                  | null
                  | undefined;
                homeTiles?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }[]
                  | null
                  | undefined;
                homePrompts?: string[] | null | undefined;
              }
            | null
            | undefined;
          githubRepo?:
            | {
                url: string;
                owner: string;
                name: string;
                installationId?: number | undefined;
                connectionId?: string | undefined;
              }
            | null
            | undefined;
          runtime?:
            | {
                selected?: string | null | undefined;
                port?: string | null | undefined;
                path?: string | null | undefined;
                env?:
                  | (
                      | { key: string; kind: "literal"; value: string }
                      | { key: string; kind: "secret"; secretId: string }
                    )[]
                  | null
                  | undefined;
                submoduleCredentials?:
                  | { host: string; secretId: string }[]
                  | null
                  | undefined;
              }
            | null
            | undefined;
          sandboxMap?:
            | Record<
                string,
                Record<
                  string,
                  Record<
                    string,
                    {
                      sandboxHandle: string;
                      previewUrl: string | null;
                      sandboxApiUrl?: string | null | undefined;
                      sandboxProviderKind?:
                        | "agent-sandbox"
                        | "user-desktop"
                        | undefined;
                      createdAt?: number | undefined;
                      startedWith?:
                        | {
                            packageManager?: string | null | undefined;
                            port?: string | null | undefined;
                            path?: string | null | undefined;
                          }
                        | undefined;
                    }
                  >
                >
              >
            | undefined;
          knowledge?:
            | {
                id: string;
                name: string;
                volume: string;
                path: string;
                url: string;
                addedAt: string;
                kind?: "file" | "skill" | undefined;
                contentType?: string | null | undefined;
                size?: number | null | undefined;
              }[]
            | null
            | undefined;
          siteSlug?: string | null | undefined;
          publishPolicy?: "smart" | "open" | "code-review" | null | undefined;
          productionUrl?: string | null | undefined;
          fieldDescriptionTooltips?: boolean | null | undefined;
          fastPreview?: boolean | null | undefined;
          syncButtonEnabled?: boolean | null | undefined;
        };
        connections: {
          connection_id: string;
          selected_tools: string[] | null;
          selected_resources: string[] | null;
          selected_prompts: string[] | null;
        }[];
        updated_by?: string | undefined;
      };
    };
  };
  DATABASES_RUN_SQL: {
    input: { sql: string; params?: unknown[] | undefined };
    output: {
      result: {
        results?: unknown[] | undefined;
        success?: boolean | undefined;
      }[];
    };
  };
  MONITORING_LOG_GET: {
    input: { id: string };
    output: {
      log: {
        organizationId: string;
        connectionId: string;
        toolName: string;
        input: Record<string, unknown>;
        output: Record<string, unknown>;
        isError: boolean;
        durationMs: number;
        timestamp: string;
        requestId: string;
        id?: string | undefined;
        errorMessage?: string | null | undefined;
        userId?: string | null | undefined;
        userAgent?: string | null | undefined;
        virtualMcpId?: string | null | undefined;
        properties?: Record<string, string> | null | undefined;
      } | null;
    };
  };
  MONITORING_LOGS_LIST: {
    input: {
      connectionId?: string | undefined;
      excludeConnectionIds?: string[] | undefined;
      virtualMcpId?: string | undefined;
      toolName?: string | undefined;
      isError?: boolean | undefined;
      startDate?: string | undefined;
      endDate?: string | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
      properties?: Record<string, string> | undefined;
      propertyKeys?: string[] | undefined;
      propertyPatterns?: Record<string, string> | undefined;
      propertyInValues?: Record<string, string> | undefined;
    };
    output: {
      logs: {
        organizationId: string;
        connectionId: string;
        toolName: string;
        isError: boolean;
        durationMs: number;
        timestamp: string;
        requestId: string;
        id?: string | undefined;
        errorMessage?: string | null | undefined;
        userId?: string | null | undefined;
        userAgent?: string | null | undefined;
        virtualMcpId?: string | null | undefined;
        properties?: Record<string, string> | null | undefined;
      }[];
      total: number;
      offset: number;
      limit: number;
    };
  };
  MONITORING_STATS: {
    input: {
      startDate?: string | undefined;
      endDate?: string | undefined;
      interval?: string | undefined;
      connectionIds?: string[] | undefined;
      excludeConnectionIds?: string[] | undefined;
      toolNames?: string[] | undefined;
      status?: "success" | "error" | undefined;
      topN?: number | undefined;
      userIds?: string[] | undefined;
      llmUsage?: boolean | undefined;
    };
    output: {
      totalCalls: number;
      avgDurationMs: number;
      errorRate?: number | undefined;
      errorRatePercent?: string | undefined;
      totalErrors?: number | undefined;
      p50DurationMs?: number | undefined;
      p95DurationMs?: number | undefined;
      connectionBreakdown?:
        | {
            connectionId: string;
            calls: number;
            errors: number;
            errorRate: number;
            avgDurationMs: number;
          }[]
        | undefined;
      totalInputTokens?: number | undefined;
      totalOutputTokens?: number | undefined;
      totalTokens?: number | undefined;
      totalCostUsd?: number | undefined;
      topTools?:
        | {
            toolName: string;
            connectionId: string | null;
            calls: number;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            costUsd?: number | undefined;
          }[]
        | undefined;
      topToolsTimeseries?:
        | {
            timestamp: string;
            toolName: string;
            calls: number;
            errors: number;
            avg: number;
            p95: number;
          }[]
        | undefined;
      timeseries?:
        | {
            timestamp: string;
            calls: number;
            errors: number;
            errorRate: number;
            avg: number;
            p50: number;
            p95: number;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            totalTokens?: number | undefined;
            costUsd?: number | undefined;
          }[]
        | undefined;
    };
  };
  MONITORING_THREAD_USAGE: {
    input: {
      threadIds: string[];
      connectionId?: string | undefined;
      startDate?: string | undefined;
      endDate?: string | undefined;
    };
    output: {
      items: {
        threadId: string;
        calls: number;
        inputTokens: number;
        outputTokens: number;
        totalTokens: number;
        costUsd: number;
      }[];
    };
  };
  API_KEY_CREATE: {
    input: {
      name: string;
      permissions: Record<string, string[]>;
      expiresIn?: number | undefined;
      metadata?: Record<string, unknown> | undefined;
    };
    output: {
      id: string;
      name: string;
      key: string;
      permissions: Record<string, string[]>;
      createdAt: string;
      expiresAt?: string | null | undefined;
    };
  };
  API_KEY_LIST: {
    input: { [x: string]: never };
    output: {
      items: {
        id: string;
        name: string;
        userId: string;
        permissions: Record<string, string[]>;
        createdAt: string;
        expiresAt?: string | null | undefined;
      }[];
    };
  };
  API_KEY_UPDATE: {
    input: {
      keyId: string;
      name?: string | undefined;
      permissions?: Record<string, string[]> | undefined;
      metadata?: Record<string, unknown> | undefined;
    };
    output: {
      item: {
        id: string;
        name: string;
        userId: string;
        permissions: Record<string, string[]>;
        createdAt: string;
        expiresAt?: string | null | undefined;
      };
    };
  };
  API_KEY_DELETE: {
    input: { keyId: string };
    output: { success: boolean; keyId: string };
  };
  USER_GET: {
    input: { id: string };
    output: {
      user: {
        id: string;
        name: string;
        email: string;
        image: string | null;
      } | null;
    };
  };
  USER_MODEL_PREFERENCES_GET: {
    input: { [x: string]: never };
    output: {
      tiers: {
        fast?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
        smart?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
        thinking?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
      };
    };
  };
  USER_MODEL_PREFERENCES_UPDATE: {
    input: {
      tiers: {
        fast?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
        smart?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
        thinking?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
      };
    };
    output: {
      tiers: {
        fast?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
        smart?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
        thinking?:
          | { keyId: string; modelId: string; title?: string | undefined }
          | null
          | undefined;
      };
    };
  };
  COLLECTION_THREADS_CREATE: {
    input: {
      data: {
        virtual_mcp_id: string;
        id?: string | undefined;
        title?: string | undefined;
        description?: string | null | undefined;
        branch?: string | undefined;
      };
    };
    output: {
      item: {
        id: string;
        organization_id: string;
        title: string;
        description: string | null;
        created_at: string;
        updated_at: string;
        status:
          | "in_progress"
          | "requires_action"
          | "failed"
          | "completed"
          | "expired";
        created_by: string;
        hidden?: boolean | undefined;
        updated_by?: string | undefined;
        virtual_mcp_id?: string | undefined;
        trigger_id?: string | null | undefined;
        branch?: string | null | undefined;
        sandbox_provider_kind?: string | null | undefined;
        harness_id?: string | null | undefined;
        metadata?:
          | {
              [x: string]: unknown;
              expanded_tools?:
                | {
                    toolName: string;
                    appId: string;
                    args: Record<string, unknown>;
                    expandedAt: string;
                  }[]
                | undefined;
              read_only?: boolean | undefined;
            }
          | undefined;
        run_config?: Record<string, unknown> | null | undefined;
      };
    };
  };
  COLLECTION_THREADS_LIST: {
    input: {
      orderBy?:
        | {
            field: string[];
            direction: "asc" | "desc";
            nulls?: "first" | "last" | undefined;
          }[]
        | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
      where?:
        | {
            created_by?: string | undefined;
            trigger_ids?: string[] | undefined;
            virtual_mcp_id?: string | undefined;
            hidden?: boolean | undefined;
            has_trigger?: boolean | undefined;
          }
        | undefined;
      startDate?: string | undefined;
      endDate?: string | undefined;
      search?: string | undefined;
      status?: string | undefined;
      userId?: string | undefined;
      agentId?: string | undefined;
    };
    output: {
      items: {
        id: string;
        organization_id: string;
        title: string;
        description: string | null;
        created_at: string;
        updated_at: string;
        status:
          | "in_progress"
          | "requires_action"
          | "failed"
          | "completed"
          | "expired";
        created_by: string;
        hidden?: boolean | undefined;
        updated_by?: string | undefined;
        virtual_mcp_id?: string | undefined;
        trigger_id?: string | null | undefined;
        branch?: string | null | undefined;
        sandbox_provider_kind?: string | null | undefined;
        harness_id?: string | null | undefined;
        metadata?:
          | {
              [x: string]: unknown;
              expanded_tools?:
                | {
                    toolName: string;
                    appId: string;
                    args: Record<string, unknown>;
                    expandedAt: string;
                  }[]
                | undefined;
              read_only?: boolean | undefined;
            }
          | undefined;
        run_config?: Record<string, unknown> | null | undefined;
      }[];
      totalCount?: number | undefined;
      hasMore?: boolean | undefined;
    };
  };
  COLLECTION_THREADS_GET: {
    input: { id: string };
    output: {
      item: {
        id: string;
        organization_id: string;
        title: string;
        description: string | null;
        created_at: string;
        updated_at: string;
        status:
          | "in_progress"
          | "requires_action"
          | "failed"
          | "completed"
          | "expired";
        created_by: string;
        hidden?: boolean | undefined;
        updated_by?: string | undefined;
        virtual_mcp_id?: string | undefined;
        trigger_id?: string | null | undefined;
        branch?: string | null | undefined;
        sandbox_provider_kind?: string | null | undefined;
        harness_id?: string | null | undefined;
        metadata?:
          | {
              [x: string]: unknown;
              expanded_tools?:
                | {
                    toolName: string;
                    appId: string;
                    args: Record<string, unknown>;
                    expandedAt: string;
                  }[]
                | undefined;
              read_only?: boolean | undefined;
            }
          | undefined;
        run_config?: Record<string, unknown> | null | undefined;
      } | null;
    };
  };
  COLLECTION_THREADS_UPDATE: {
    input: {
      id: string;
      data: {
        title?: string | undefined;
        description?: string | null | undefined;
        hidden?: boolean | undefined;
        status?:
          | "in_progress"
          | "requires_action"
          | "failed"
          | "completed"
          | undefined;
        metadata?:
          | {
              [x: string]: unknown;
              expanded_tools?:
                | {
                    toolName: string;
                    appId: string;
                    args: Record<string, unknown>;
                    expandedAt: string;
                  }[]
                | undefined;
              read_only?: boolean | undefined;
            }
          | undefined;
        branch?: string | null | undefined;
        virtual_mcp_id?: string | undefined;
      };
    };
    output: {
      item: {
        id: string;
        organization_id: string;
        title: string;
        description: string | null;
        created_at: string;
        updated_at: string;
        status:
          | "in_progress"
          | "requires_action"
          | "failed"
          | "completed"
          | "expired";
        created_by: string;
        hidden?: boolean | undefined;
        updated_by?: string | undefined;
        virtual_mcp_id?: string | undefined;
        trigger_id?: string | null | undefined;
        branch?: string | null | undefined;
        sandbox_provider_kind?: string | null | undefined;
        harness_id?: string | null | undefined;
        metadata?:
          | {
              [x: string]: unknown;
              expanded_tools?:
                | {
                    toolName: string;
                    appId: string;
                    args: Record<string, unknown>;
                    expandedAt: string;
                  }[]
                | undefined;
              read_only?: boolean | undefined;
            }
          | undefined;
        run_config?: Record<string, unknown> | null | undefined;
      };
    };
  };
  COLLECTION_THREADS_DELETE: {
    input: { id: string };
    output: {
      item: {
        id: string;
        organization_id: string;
        title: string;
        description: string | null;
        created_at: string;
        updated_at: string;
        status:
          | "in_progress"
          | "requires_action"
          | "failed"
          | "completed"
          | "expired";
        created_by: string;
        hidden?: boolean | undefined;
        updated_by?: string | undefined;
        virtual_mcp_id?: string | undefined;
        trigger_id?: string | null | undefined;
        branch?: string | null | undefined;
        sandbox_provider_kind?: string | null | undefined;
        harness_id?: string | null | undefined;
        metadata?:
          | {
              [x: string]: unknown;
              expanded_tools?:
                | {
                    toolName: string;
                    appId: string;
                    args: Record<string, unknown>;
                    expandedAt: string;
                  }[]
                | undefined;
              read_only?: boolean | undefined;
            }
          | undefined;
        run_config?: Record<string, unknown> | null | undefined;
      };
    };
  };
  COLLECTION_THREAD_MESSAGES_LIST: {
    input: {
      where?: unknown;
      orderBy?:
        | {
            field: string[];
            direction: "asc" | "desc";
            nulls?: "first" | "last" | undefined;
          }[]
        | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
      thread_id?: string | undefined;
    };
    output: {
      items: {
        id: string;
        thread_id: string;
        parts: Record<string, unknown>[];
        role: "user" | "assistant" | "system";
        created_at: string;
        updated_at: string;
        metadata?: unknown;
      }[];
      totalCount?: number | undefined;
      hasMore?: boolean | undefined;
    };
  };
  TAGS_LIST: {
    input: { [x: string]: never };
    output: {
      tags: {
        id: string;
        organizationId: string;
        name: string;
        color: string | null;
        createdAt: string;
      }[];
    };
  };
  TAGS_CREATE: {
    input: { name: string; color?: string | null | undefined };
    output: {
      tag: {
        id: string;
        organizationId: string;
        name: string;
        color: string | null;
        createdAt: string;
      };
    };
  };
  TAGS_DELETE: { input: { tagId: string }; output: { success: boolean } };
  MEMBER_TAGS_GET: {
    input: { memberId: string };
    output: {
      tags: {
        id: string;
        organizationId: string;
        name: string;
        color: string | null;
        createdAt: string;
      }[];
    };
  };
  MEMBER_TAGS_SET: {
    input: { memberId: string; tagIds: string[] };
    output: {
      success: boolean;
      tags: {
        id: string;
        organizationId: string;
        name: string;
        createdAt: string;
      }[];
    };
  };
  AUTOMATION_CREATE: {
    input: {
      name: string;
      virtual_mcp_id: string;
      messages:
        | string
        | {
            [x: string]: unknown;
            role: "user" | "assistant" | "system";
            parts: Record<string, unknown>[];
            id?: string | undefined;
            metadata?: unknown;
          }[];
      models?:
        | {
            [x: string]: unknown;
            tier: "fast" | "smart" | "thinking";
            modelId?: string | undefined;
            credentialId?: string | undefined;
          }
        | undefined;
      tools?: string[] | null | undefined;
      maxAgentSteps?: number | null | undefined;
      temperature?: number | undefined;
      active?: boolean | undefined;
    };
    output: { id: string; name: string; active: boolean; created_at: string };
  };
  AUTOMATION_GET: {
    input: { id: string };
    output: {
      automation: {
        id: string;
        name: string;
        active: boolean;
        created_by: string;
        created_at: string;
        updated_at: string;
        virtual_mcp_id: string;
        messages: unknown;
        models: unknown;
        tools: string[] | null;
        maxAgentSteps: number | null;
        temperature: number;
        triggers: {
          id: string;
          type: "cron" | "event" | "webhook";
          cron_expression: string | null;
          connection_id: string | null;
          event_type: string | null;
          params: unknown;
          last_run_at: string | null;
          api_key_id: string | null;
          created_at: string;
        }[];
      } | null;
    };
  };
  AUTOMATION_LIST: {
    input: { virtual_mcp_id?: string | null | undefined };
    output: {
      automations: {
        id: string;
        name: string;
        active: boolean;
        created_by: string;
        created_at: string;
        trigger_count: number;
        nearest_next_run_at: string | null;
        virtual_mcp_id: string;
      }[];
    };
  };
  AUTOMATION_UPDATE: {
    input: {
      id: string;
      name?: string | undefined;
      active?: boolean | undefined;
      messages?:
        | string
        | {
            [x: string]: unknown;
            role: "user" | "assistant" | "system";
            parts: Record<string, unknown>[];
            id?: string | undefined;
            metadata?: unknown;
          }[]
        | undefined;
      models?:
        | {
            [x: string]: unknown;
            tier: "fast" | "smart" | "thinking";
            modelId?: string | undefined;
            credentialId?: string | undefined;
          }
        | undefined;
      tools?: string[] | null | undefined;
      maxAgentSteps?: number | null | undefined;
      temperature?: number | undefined;
    };
    output: { id: string; name: string; active: boolean; updated_at: string };
  };
  AUTOMATION_DELETE: { input: { id: string }; output: { success: boolean } };
  AUTOMATION_TRIGGER_ADD: {
    input: {
      automation_id: string;
      type: "cron" | "event" | "webhook";
      cron_expression?: string | undefined;
      connection_id?: string | undefined;
      event_type?: string | undefined;
      params?: Record<string, string> | undefined;
    };
    output: {
      id: string;
      automation_id: string;
      type: "cron" | "event" | "webhook";
      created_at: string;
      webhook?: { url: string; token: string } | null | undefined;
    };
  };
  AUTOMATION_TRIGGER_REMOVE: {
    input: { trigger_id: string };
    output: { success: boolean };
  };
  AUTOMATION_TRIGGER_ROTATE_TOKEN: {
    input: { trigger_id: string };
    output: { trigger_id: string; url: string; token: string };
  };
  AUTOMATION_RUN: {
    input: { id: string };
    output: {
      threadId?: string | undefined;
      error?: string | undefined;
      skipped?: string | undefined;
    };
  };
  AUTOMATION_RUN_STATS: {
    input: {
      automation_id: string;
      startDate?: string | undefined;
      endDate?: string | undefined;
    };
    output: {
      runs: {
        total: number;
        completed: number;
        failed: number;
        inProgress: number;
      };
      usage: {
        calls: number;
        inputTokens: number;
        outputTokens: number;
        totalTokens: number;
        costUsd: number;
        sampledRuns: number;
        truncated: boolean;
      };
    };
  };
  VIRTUAL_MCP_PLUGIN_CONFIG_GET: {
    input: { virtualMcpId: string; pluginId: string };
    output: {
      config: {
        id: string;
        virtualMcpId: string;
        pluginId: string;
        connectionId: string | null;
        settings: Record<string, unknown> | null;
        createdAt: string;
        updatedAt: string;
      } | null;
    };
  };
  VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE: {
    input: {
      virtualMcpId: string;
      pluginId: string;
      connectionId?: string | null | undefined;
      settings?: Record<string, unknown> | null | undefined;
    };
    output: {
      config: {
        id: string;
        virtualMcpId: string;
        pluginId: string;
        connectionId: string | null;
        settings: Record<string, unknown> | null;
        createdAt: string;
        updatedAt: string;
      };
    };
  };
  VIRTUAL_MCP_PINNED_VIEWS_UPDATE: {
    input: {
      virtualMcpId: string;
      pinnedViews: {
        connectionId: string;
        toolName: string;
        label: string;
        icon?: string | null | undefined;
      }[];
      layout?:
        | {
            defaultMainView?:
              | {
                  type: string;
                  id?: string | undefined;
                  toolName?: string | undefined;
                }
              | null
              | undefined;
            chatDefaultOpen?: boolean | null | undefined;
          }
        | undefined;
    };
    output: {
      item: {
        id: string;
        title: string;
        description: string | null;
        icon: string | null;
        created_at: string;
        updated_at: string;
        created_by: string;
        organization_id: string;
        status: "active" | "inactive";
        pinned: boolean;
        metadata: {
          [x: string]: unknown;
          instructions: string | null;
          enabled_plugins?: string[] | null | undefined;
          subAgents?: string[] | null | undefined;
          liveAgentId?: string | null | undefined;
          ui?:
            | {
                banner?: string | null | undefined;
                bannerColor?: string | null | undefined;
                icon?: string | null | undefined;
                themeColor?: string | null | undefined;
                pinnedViews?:
                  | {
                      connectionId: string;
                      toolName: string;
                      label: string;
                      icon?: string | null | undefined;
                    }[]
                  | null
                  | undefined;
                layout?:
                  | {
                      defaultMainView?:
                        | {
                            type: string;
                            id?: string | undefined;
                            toolName?: string | undefined;
                          }
                        | null
                        | undefined;
                      chatDefaultOpen?: boolean | null | undefined;
                      cmsDefaultOpen?: boolean | null | undefined;
                      tabs?:
                        | {
                            id: string;
                            title: string;
                            view: {
                              type: "ext-app";
                              appId: string;
                              args?: Record<string, unknown> | undefined;
                            };
                            icon?: string | undefined;
                          }[]
                        | undefined;
                    }
                  | null
                  | undefined;
                homeTile?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }
                  | null
                  | undefined;
                homeTiles?:
                  | {
                      resourceUri: string;
                      tileId?: string | undefined;
                      connectionId?: string | undefined;
                      toolName?: string | undefined;
                      toolInput?: Record<string, unknown> | undefined;
                      minHeight?: number | undefined;
                      maxHeight?: number | undefined;
                    }[]
                  | null
                  | undefined;
                homePrompts?: string[] | null | undefined;
              }
            | null
            | undefined;
          githubRepo?:
            | {
                url: string;
                owner: string;
                name: string;
                installationId?: number | undefined;
                connectionId?: string | undefined;
              }
            | null
            | undefined;
          runtime?:
            | {
                selected?: string | null | undefined;
                port?: string | null | undefined;
                path?: string | null | undefined;
                env?:
                  | (
                      | { key: string; kind: "literal"; value: string }
                      | { key: string; kind: "secret"; secretId: string }
                    )[]
                  | null
                  | undefined;
                submoduleCredentials?:
                  | { host: string; secretId: string }[]
                  | null
                  | undefined;
              }
            | null
            | undefined;
          sandboxMap?:
            | Record<
                string,
                Record<
                  string,
                  Record<
                    string,
                    {
                      sandboxHandle: string;
                      previewUrl: string | null;
                      sandboxApiUrl?: string | null | undefined;
                      sandboxProviderKind?:
                        | "agent-sandbox"
                        | "user-desktop"
                        | undefined;
                      createdAt?: number | undefined;
                      startedWith?:
                        | {
                            packageManager?: string | null | undefined;
                            port?: string | null | undefined;
                            path?: string | null | undefined;
                          }
                        | undefined;
                    }
                  >
                >
              >
            | undefined;
          knowledge?:
            | {
                id: string;
                name: string;
                volume: string;
                path: string;
                url: string;
                addedAt: string;
                kind?: "file" | "skill" | undefined;
                contentType?: string | null | undefined;
                size?: number | null | undefined;
              }[]
            | null
            | undefined;
          siteSlug?: string | null | undefined;
          publishPolicy?: "smart" | "open" | "code-review" | null | undefined;
          productionUrl?: string | null | undefined;
          fieldDescriptionTooltips?: boolean | null | undefined;
          fastPreview?: boolean | null | undefined;
          syncButtonEnabled?: boolean | null | undefined;
        };
        connections: {
          connection_id: string;
          selected_tools: string[] | null;
          selected_resources: string[] | null;
          selected_prompts: string[] | null;
        }[];
        updated_by?: string | undefined;
      } | null;
    };
  };
  VIRTUAL_MCP_LAST_USED_LIST: {
    input: { ids: string[] };
    output: {
      items: {
        id: string;
        last_used_at?: string | undefined;
        last_used_by?: string | undefined;
      }[];
    };
  };
  AI_PROVIDERS_LIST: {
    input: { [x: string]: never };
    output: {
      providers: {
        id: string;
        name: string;
        description: string;
        supportedMethods: ("api-key" | "oauth-pkce")[];
        logo?: string | undefined;
        supportsTopUp?: boolean | undefined;
        supportsCredits?: boolean | undefined;
        supportsProvision?: boolean | undefined;
      }[];
    };
  };
  AI_PROVIDERS_LIST_MODELS: {
    input: { keyId: string };
    output: {
      models: {
        providerId: string;
        modelId: string;
        title: string;
        capabilities: string[];
        description?: string | null | undefined;
        logo?: string | null | undefined;
        limits?:
          | { contextWindow: number; maxOutputTokens: number | null }
          | null
          | undefined;
        costs?: { input: number; output: number } | null | undefined;
        asyncResearch?: boolean | undefined;
      }[];
    };
  };
  AI_PROVIDERS_ACTIVE: {
    input: { [x: string]: never };
    output: {
      providers: {
        id: string;
        name: string;
        description: string;
        keyCount: number;
        logo?: string | undefined;
      }[];
    };
  };
  AI_PROVIDER_KEY_CREATE: {
    input: {
      providerId:
        | "google"
        | "deco"
        | "anthropic"
        | "openrouter"
        | "llmapi"
        | "openai-compatible";
      label: string;
      apiKey: string;
      presetId?: string | undefined;
    };
    output: {
      id: string;
      providerId: string;
      label: string;
      presetId: string | null;
      createdAt: string;
    };
  };
  AI_PROVIDER_KEY_DELETE: {
    input: { keyId: string };
    output: { success: boolean };
  };
  AI_PROVIDER_KEY_UPDATE: {
    input: {
      keyId: string;
      label?: string | undefined;
      apiKey?: string | undefined;
    };
    output: {
      id: string;
      providerId: string;
      label: string;
      presetId: string | null;
      createdAt: string;
    };
  };
  AI_PROVIDER_KEY_PREVIEW: {
    input: { keyId: string };
    output: { label: string; maskedKey: string; baseUrl?: string | undefined };
  };
  AI_PROVIDER_KEY_LIST: {
    input: {
      providerId?:
        | "google"
        | "deco"
        | "anthropic"
        | "openrouter"
        | "llmapi"
        | "openai-compatible"
        | "claude-code"
        | "codex"
        | undefined;
    };
    output: {
      keys: {
        id: string;
        providerId: string;
        label: string;
        presetId: string | null;
        createdBy: string;
        createdAt: string;
      }[];
    };
  };
  AI_PROVIDER_OAUTH_URL: {
    input: {
      providerId:
        | "google"
        | "deco"
        | "anthropic"
        | "openrouter"
        | "llmapi"
        | "openai-compatible";
      callbackUrl: string;
    };
    output: { url: string; stateToken: string };
  };
  AI_PROVIDER_OAUTH_EXCHANGE: {
    input: {
      providerId:
        | "google"
        | "deco"
        | "anthropic"
        | "openrouter"
        | "llmapi"
        | "openai-compatible";
      code: string;
      stateToken: string;
      label: string;
    };
    output: {
      id: string;
      providerId: string;
      label: string;
      presetId: string | null;
      createdAt: string;
    };
  };
  AI_PROVIDER_PROVISION_KEY: {
    input: {
      providerId:
        | "google"
        | "deco"
        | "anthropic"
        | "openrouter"
        | "llmapi"
        | "openai-compatible";
    };
    output: {
      id: string;
      providerId: string;
      label: string;
      presetId: string | null;
      createdAt: string;
    };
  };
  AI_PROVIDER_TOPUP_URL: {
    input: {
      providerId:
        | "google"
        | "deco"
        | "anthropic"
        | "openrouter"
        | "llmapi"
        | "openai-compatible";
      amountCents: number;
      currency?: "usd" | "brl" | undefined;
    };
    output: { url: string };
  };
  AI_PROVIDER_CREDITS: {
    input: {
      providerId:
        | "google"
        | "deco"
        | "anthropic"
        | "openrouter"
        | "llmapi"
        | "openai-compatible";
    };
    output: { balanceCents: number };
  };
  CLAUDE_SUBSCRIPTION_CONNECT: {
    input: { token: string };
    output: {
      connected: boolean;
      linkedAt: string | null;
      expiresAt: string | null;
    };
  };
  CLAUDE_SUBSCRIPTION_STATUS: {
    input: { [x: string]: never };
    output: {
      connected: boolean;
      linkedAt: string | null;
      expiresAt: string | null;
    };
  };
  CLAUDE_SUBSCRIPTION_DISCONNECT: {
    input: { [x: string]: never };
    output: {
      connected: boolean;
      linkedAt: string | null;
      expiresAt: string | null;
    };
  };
  SECRET_CREATE: {
    input: {
      scope: "user" | "organization";
      name: string;
      value: string;
      description?: string | undefined;
    };
    output: {
      id: string;
      scope: "user" | "organization";
      userId: string | null;
      name: string;
      description: string | null;
      createdBy: string;
      createdAt: string;
      updatedBy: string;
      updatedAt: string;
    };
  };
  SECRET_LIST: {
    input: { scope?: "user" | "organization" | undefined };
    output: {
      secrets: {
        id: string;
        scope: "user" | "organization";
        userId: string | null;
        name: string;
        description: string | null;
        createdBy: string;
        createdAt: string;
        updatedBy: string;
        updatedAt: string;
      }[];
    };
  };
  FILE_CONFIG_CREATE: {
    input: {
      name: string;
      description?: string | undefined;
      bucket?: string | undefined;
      region?: string | undefined;
      endpoint?: string | undefined;
      forcePathStyle?: boolean | undefined;
      prefix?: string | undefined;
      publicUrlBase?: string | undefined;
      credentialType?: "static" | "sts-session" | "managed" | undefined;
      accessKeyId?: string | undefined;
      secretAccessKey?: string | undefined;
      refreshUrl?: string | undefined;
      apiKey?: string | undefined;
      siteSlug?: string | undefined;
    };
    output: {
      id: string;
      name: string;
      description: string | null;
      bucket: string;
      region: string;
      endpoint: string | null;
      forcePathStyle: boolean;
      prefix: string | null;
      publicUrlBase: string | null;
      credentialType: "static" | "sts-session" | "managed";
      refreshUrl: string | null;
      siteSlug: string | null;
      createdBy: string;
      createdAt: string;
      updatedBy: string;
      updatedAt: string;
    };
  };
  FILE_CONFIG_LIST: {
    input: { [x: string]: never };
    output: {
      configs: {
        id: string;
        name: string;
        description: string | null;
        bucket: string;
        region: string;
        endpoint: string | null;
        forcePathStyle: boolean;
        prefix: string | null;
        publicUrlBase: string | null;
        credentialType: "static" | "sts-session" | "managed";
        refreshUrl: string | null;
        siteSlug: string | null;
        createdBy: string;
        createdAt: string;
        updatedBy: string;
        updatedAt: string;
      }[];
    };
  };
  FILE_CONFIG_UPDATE: {
    input: {
      id: string;
      name?: string | undefined;
      description?: string | null | undefined;
      bucket?: string | undefined;
      region?: string | undefined;
      endpoint?: string | null | undefined;
      forcePathStyle?: boolean | undefined;
      prefix?: string | null | undefined;
      publicUrlBase?: string | null | undefined;
      accessKeyId?: string | undefined;
      secretAccessKey?: string | undefined;
      refreshUrl?: string | undefined;
      apiKey?: string | undefined;
    };
    output: {
      id: string;
      name: string;
      description: string | null;
      bucket: string;
      region: string;
      endpoint: string | null;
      forcePathStyle: boolean;
      prefix: string | null;
      publicUrlBase: string | null;
      credentialType: "static" | "sts-session" | "managed";
      refreshUrl: string | null;
      siteSlug: string | null;
      createdBy: string;
      createdAt: string;
      updatedBy: string;
      updatedAt: string;
    };
  };
  FILE_CONFIG_DELETE: { input: { id: string }; output: { success: true } };
  FILE_OBJECTS_LIST: {
    input: {
      configId: string;
      cursor?: string | null | undefined;
      maxKeys?: number | undefined;
      search?: string | null | undefined;
      imageOnly?: boolean | undefined;
    };
    output: {
      items: {
        key: string;
        size: number;
        lastModified: string | null;
        publicUrl: string;
      }[];
      nextCursor: string | null;
    };
  };
  ORG_FS_PUBLIC_SETS_SYNC: {
    input: { [x: string]: never };
    output: {
      results: (
        | { set: string; written: number; deleted: number; unchanged: number }
        | { set: string; error: string }
      )[];
    };
  };
  LIST_OBJECTS: {
    input: {
      prefix?: string | undefined;
      maxKeys?: number | undefined;
      continuationToken?: string | undefined;
      delimiter?: string | undefined;
    };
    output: {
      objects: {
        key: string;
        size: number;
        lastModified: string;
        etag: string;
      }[];
      isTruncated: boolean;
      nextContinuationToken?: string | undefined;
      commonPrefixes?: string[] | undefined;
    };
  };
  GET_OBJECT_METADATA: {
    input: { key: string };
    output: {
      contentLength: number;
      lastModified: string;
      etag: string;
      contentType?: string | undefined;
      metadata?: Record<string, string> | undefined;
    };
  };
  GET_PRESIGNED_URL: {
    input: { key: string; expiresIn?: number | undefined };
    output: { url: string; expiresIn: number };
  };
  PUT_PRESIGNED_URL: {
    input: {
      key: string;
      expiresIn?: number | undefined;
      contentType?: string | undefined;
    };
    output: { url: string; expiresIn: number };
  };
  DELETE_OBJECT: {
    input: { key: string };
    output: { success: boolean; key: string };
  };
  DELETE_OBJECTS: {
    input: { keys: string[] };
    output: { deleted: string[]; errors: { key: string; message: string }[] };
  };
  COLLECTION_REGISTRY_APP_LIST: {
    input: {
      where?: unknown;
      orderBy?:
        | {
            field: string[];
            direction: "asc" | "desc";
            nulls?: "first" | "last" | undefined;
          }[]
        | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
      tags?: string[] | undefined;
      categories?: string[] | undefined;
      cursor?: string | undefined;
    };
    output: {
      items: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      }[];
      totalCount: number;
      hasMore?: boolean | undefined;
      nextCursor?: string | undefined;
    };
  };
  COLLECTION_REGISTRY_APP_GET: {
    input: { id?: string | undefined; name?: string | undefined };
    output: {
      item: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      } | null;
    };
  };
  COLLECTION_REGISTRY_APP_VERSIONS: {
    input: { id?: string | undefined; name?: string | undefined };
    output: {
      versions: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      }[];
    };
  };
  COLLECTION_REGISTRY_APP_FILTERS: {
    input: { [x: string]: never };
    output: {
      tags: { value: string; count: number }[];
      categories: { value: string; count: number }[];
    };
  };
  REGISTRY_ITEM_LIST: {
    input: {
      where?: unknown;
      orderBy?:
        | {
            field: string[];
            direction: "asc" | "desc";
            nulls?: "first" | "last" | undefined;
          }[]
        | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
      tags?: string[] | undefined;
      categories?: string[] | undefined;
      cursor?: string | undefined;
    };
    output: {
      items: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      }[];
      totalCount: number;
      hasMore?: boolean | undefined;
      nextCursor?: string | undefined;
    };
  };
  REGISTRY_ITEM_SEARCH: {
    input: {
      query?: string | undefined;
      tags?: string[] | undefined;
      categories?: string[] | undefined;
      limit?: number | undefined;
      cursor?: string | undefined;
    };
    output: {
      items: {
        id: string;
        title: string;
        tags: string[];
        categories: string[];
        is_public: boolean;
        is_unlisted: boolean;
      }[];
      totalCount: number;
      hasMore?: boolean | undefined;
      nextCursor?: string | undefined;
    };
  };
  REGISTRY_ITEM_GET: {
    input: { id?: string | undefined; name?: string | undefined };
    output: {
      item: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      } | null;
    };
  };
  REGISTRY_ITEM_VERSIONS: {
    input: { id?: string | undefined; name?: string | undefined };
    output: {
      versions: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      }[];
    };
  };
  REGISTRY_ITEM_CREATE: {
    input: {
      data: {
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
      };
    };
    output: {
      item: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      };
    };
  };
  REGISTRY_ITEM_BULK_CREATE: {
    input: {
      items: {
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
      }[];
    };
    output: { created: number; errors: { id: string; error: string }[] };
  };
  REGISTRY_ITEM_UPDATE: {
    input: {
      id: string;
      data: {
        title?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        server?:
          | {
              [x: string]: unknown;
              name: string;
              title?: string | undefined;
              description?: string | undefined;
              version?: string | undefined;
              websiteUrl?: string | undefined;
              icons?: { [x: string]: unknown; src: string }[] | undefined;
              remotes?:
                | {
                    [x: string]: unknown;
                    type?: string | undefined;
                    url?: string | undefined;
                    name?: string | undefined;
                    title?: string | undefined;
                    description?: string | undefined;
                  }[]
                | undefined;
              packages?:
                | {
                    [x: string]: unknown;
                    identifier: string;
                    version?: string | undefined;
                  }[]
                | undefined;
              repository?:
                | {
                    [x: string]: unknown;
                    url?: string | undefined;
                    source?: string | undefined;
                    subfolder?: string | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
      };
    };
    output: {
      item: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      };
    };
  };
  REGISTRY_ITEM_DELETE: {
    input: { id: string };
    output: {
      item: {
        [x: string]: unknown;
        id: string;
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        name?: string | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        is_public?: boolean | undefined;
        is_unlisted?: boolean | undefined;
        created_by?: string | undefined;
      };
    };
  };
  REGISTRY_ITEM_FILTERS: {
    input: { [x: string]: never };
    output: {
      tags: { value: string; count: number }[];
      categories: { value: string; count: number }[];
    };
  };
  REGISTRY_DISCOVER_TOOLS: {
    input: { url: string; type?: "http" | "sse" | undefined };
    output: {
      tools: { name: string; description?: string | null | undefined }[];
      error?: string | null | undefined;
    };
  };
  REGISTRY_AI_GENERATE: {
    input: {
      type:
        | "description"
        | "tags"
        | "categories"
        | "short_description"
        | "readme";
      llmConnectionId: string;
      modelId: string;
      context: {
        name?: string | undefined;
        provider?: string | undefined;
        url?: string | undefined;
        owner?: string | undefined;
        repositoryUrl?: string | undefined;
        description?: string | undefined;
        shortDescription?: string | undefined;
        tags?: string[] | undefined;
        categories?: string[] | undefined;
        availableTags?: string[] | undefined;
        availableCategories?: string[] | undefined;
        tools?:
          | { name: string; description?: string | null | undefined }[]
          | undefined;
      };
    };
    output: { result?: string | undefined; items?: string[] | undefined };
  };
  REGISTRY_PUBLISH_REQUEST_LIST: {
    input: {
      status?: "pending" | "rejected" | "approved" | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
      sortBy?: "title" | "created_at" | undefined;
      sortDirection?: "asc" | "desc" | undefined;
    };
    output: {
      items: {
        id: string;
        organization_id: string;
        status: "pending" | "rejected" | "approved";
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        requested_id?: string | null | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        requester_name?: string | null | undefined;
        requester_email?: string | null | undefined;
        reviewer_notes?: string | null | undefined;
      }[];
      totalCount: number;
    };
  };
  REGISTRY_PUBLISH_REQUEST_REVIEW: {
    input: {
      id: string;
      status: "rejected" | "approved";
      reviewerNotes?: string | null | undefined;
    };
    output: {
      item: {
        id: string;
        organization_id: string;
        status: "pending" | "rejected" | "approved";
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        requested_id?: string | null | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        requester_name?: string | null | undefined;
        requester_email?: string | null | undefined;
        reviewer_notes?: string | null | undefined;
      };
    };
  };
  REGISTRY_PUBLISH_REQUEST_COUNT: {
    input: { [x: string]: never };
    output: { pending: number };
  };
  REGISTRY_PUBLISH_REQUEST_DELETE: {
    input: { id: string };
    output: {
      item: {
        id: string;
        organization_id: string;
        status: "pending" | "rejected" | "approved";
        title: string;
        server: {
          [x: string]: unknown;
          name: string;
          title?: string | undefined;
          description?: string | undefined;
          version?: string | undefined;
          websiteUrl?: string | undefined;
          icons?: { [x: string]: unknown; src: string }[] | undefined;
          remotes?:
            | {
                [x: string]: unknown;
                type?: string | undefined;
                url?: string | undefined;
                name?: string | undefined;
                title?: string | undefined;
                description?: string | undefined;
              }[]
            | undefined;
          packages?:
            | {
                [x: string]: unknown;
                identifier: string;
                version?: string | undefined;
              }[]
            | undefined;
          repository?:
            | {
                [x: string]: unknown;
                url?: string | undefined;
                source?: string | undefined;
                subfolder?: string | undefined;
              }
            | undefined;
        };
        created_at: string;
        updated_at: string;
        requested_id?: string | null | undefined;
        description?: string | null | undefined;
        _meta?:
          | {
              [x: string]: unknown;
              "mcp.studio"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
              "mcp.mesh"?:
                | {
                    [x: string]: unknown;
                    verified?: boolean | undefined;
                    official?: boolean | undefined;
                    tags?: string[] | undefined;
                    categories?: string[] | undefined;
                    friendly_name?: string | null | undefined;
                    short_description?: string | null | undefined;
                    owner?: string | null | undefined;
                    readme?: string | null | undefined;
                    readme_url?: string | null | undefined;
                    has_remote?: boolean | undefined;
                    has_oauth?: boolean | undefined;
                    tools?:
                      | {
                          [x: string]: unknown;
                          name: string;
                          description?: string | null | undefined;
                        }[]
                      | undefined;
                  }
                | undefined;
            }
          | undefined;
        requester_name?: string | null | undefined;
        requester_email?: string | null | undefined;
        reviewer_notes?: string | null | undefined;
      } | null;
    };
  };
  REGISTRY_PUBLISH_API_KEY_GENERATE: {
    input: { name: string };
    output: {
      id: string;
      name: string;
      prefix: string;
      key: string;
      createdAt: string;
    };
  };
  REGISTRY_PUBLISH_API_KEY_LIST: {
    input: { [x: string]: never };
    output: {
      items: { id: string; name: string; prefix: string; createdAt: string }[];
    };
  };
  REGISTRY_PUBLISH_API_KEY_REVOKE: {
    input: { keyId: string };
    output: { success: boolean; keyId: string };
  };
  REGISTRY_MONITOR_RUN_START: {
    input: {
      config?:
        | {
            monitorMode?:
              | "health_check"
              | "tool_call"
              | "full_agent"
              | undefined;
            testMode?: "health_check" | "tool_call" | "full_agent" | undefined;
            onFailure?:
              | "none"
              | "unlisted"
              | "remove_public"
              | "remove_private"
              | "remove_all"
              | undefined;
            schedule?: "cron" | "manual" | undefined;
            cronExpression?: string | undefined;
            scheduleEventId?: string | undefined;
            perMcpTimeoutMs?: number | undefined;
            perToolTimeoutMs?: number | undefined;
            maxAgentSteps?: number | undefined;
            testPublicOnly?: boolean | undefined;
            testPrivateOnly?: boolean | undefined;
            includePendingRequests?: boolean | undefined;
            agentContext?: string | undefined;
            llmConnectionId?: string | undefined;
            llmModelId?: string | undefined;
          }
        | undefined;
    };
    output: {
      run: {
        id: string;
        organization_id: string;
        status: "pending" | "failed" | "completed" | "cancelled" | "running";
        config_snapshot: {
          monitorMode: "health_check" | "tool_call" | "full_agent";
          onFailure:
            | "none"
            | "unlisted"
            | "remove_public"
            | "remove_private"
            | "remove_all";
          schedule: "cron" | "manual";
          perMcpTimeoutMs: number;
          perToolTimeoutMs: number;
          maxAgentSteps: number;
          testPublicOnly: boolean;
          testPrivateOnly: boolean;
          includePendingRequests: boolean;
          testMode?: "health_check" | "tool_call" | "full_agent" | undefined;
          cronExpression?: string | undefined;
          scheduleEventId?: string | undefined;
          agentContext?: string | undefined;
          llmConnectionId?: string | undefined;
          llmModelId?: string | undefined;
        } | null;
        total_items: number;
        tested_items: number;
        passed_items: number;
        failed_items: number;
        skipped_items: number;
        current_item_id: string | null;
        started_at: string | null;
        finished_at: string | null;
        created_at: string;
      };
    };
  };
  REGISTRY_MONITOR_RUN_LIST: {
    input: {
      status?:
        | "pending"
        | "failed"
        | "completed"
        | "cancelled"
        | "running"
        | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
    };
    output: {
      items: {
        id: string;
        organization_id: string;
        status: "pending" | "failed" | "completed" | "cancelled" | "running";
        config_snapshot: {
          monitorMode: "health_check" | "tool_call" | "full_agent";
          onFailure:
            | "none"
            | "unlisted"
            | "remove_public"
            | "remove_private"
            | "remove_all";
          schedule: "cron" | "manual";
          perMcpTimeoutMs: number;
          perToolTimeoutMs: number;
          maxAgentSteps: number;
          testPublicOnly: boolean;
          testPrivateOnly: boolean;
          includePendingRequests: boolean;
          testMode?: "health_check" | "tool_call" | "full_agent" | undefined;
          cronExpression?: string | undefined;
          scheduleEventId?: string | undefined;
          agentContext?: string | undefined;
          llmConnectionId?: string | undefined;
          llmModelId?: string | undefined;
        } | null;
        total_items: number;
        tested_items: number;
        passed_items: number;
        failed_items: number;
        skipped_items: number;
        current_item_id: string | null;
        started_at: string | null;
        finished_at: string | null;
        created_at: string;
      }[];
      totalCount: number;
    };
  };
  REGISTRY_MONITOR_RUN_GET: {
    input: { runId: string };
    output: {
      run: {
        id: string;
        organization_id: string;
        status: "pending" | "failed" | "completed" | "cancelled" | "running";
        config_snapshot: {
          monitorMode: "health_check" | "tool_call" | "full_agent";
          onFailure:
            | "none"
            | "unlisted"
            | "remove_public"
            | "remove_private"
            | "remove_all";
          schedule: "cron" | "manual";
          perMcpTimeoutMs: number;
          perToolTimeoutMs: number;
          maxAgentSteps: number;
          testPublicOnly: boolean;
          testPrivateOnly: boolean;
          includePendingRequests: boolean;
          testMode?: "health_check" | "tool_call" | "full_agent" | undefined;
          cronExpression?: string | undefined;
          scheduleEventId?: string | undefined;
          agentContext?: string | undefined;
          llmConnectionId?: string | undefined;
          llmModelId?: string | undefined;
        } | null;
        total_items: number;
        tested_items: number;
        passed_items: number;
        failed_items: number;
        skipped_items: number;
        current_item_id: string | null;
        started_at: string | null;
        finished_at: string | null;
        created_at: string;
      } | null;
    };
  };
  REGISTRY_MONITOR_RUN_CANCEL: {
    input: { runId: string };
    output: {
      run: {
        id: string;
        organization_id: string;
        status: "pending" | "failed" | "completed" | "cancelled" | "running";
        config_snapshot: {
          monitorMode: "health_check" | "tool_call" | "full_agent";
          onFailure:
            | "none"
            | "unlisted"
            | "remove_public"
            | "remove_private"
            | "remove_all";
          schedule: "cron" | "manual";
          perMcpTimeoutMs: number;
          perToolTimeoutMs: number;
          maxAgentSteps: number;
          testPublicOnly: boolean;
          testPrivateOnly: boolean;
          includePendingRequests: boolean;
          testMode?: "health_check" | "tool_call" | "full_agent" | undefined;
          cronExpression?: string | undefined;
          scheduleEventId?: string | undefined;
          agentContext?: string | undefined;
          llmConnectionId?: string | undefined;
          llmModelId?: string | undefined;
        } | null;
        total_items: number;
        tested_items: number;
        passed_items: number;
        failed_items: number;
        skipped_items: number;
        current_item_id: string | null;
        started_at: string | null;
        finished_at: string | null;
        created_at: string;
      };
    };
  };
  REGISTRY_MONITOR_RESULT_LIST: {
    input: {
      runId: string;
      status?:
        | "error"
        | "failed"
        | "skipped"
        | "passed"
        | "needs_auth"
        | undefined;
      limit?: number | undefined;
      offset?: number | undefined;
    };
    output: {
      items: {
        id: string;
        run_id: string;
        organization_id: string;
        item_id: string;
        item_title: string;
        status: "error" | "failed" | "skipped" | "passed" | "needs_auth";
        error_message: string | null;
        connection_ok: boolean;
        tools_listed: boolean;
        tool_results: {
          toolName: string;
          success: boolean;
          durationMs: number;
          input?: Record<string, unknown> | undefined;
          outputPreview?: string | null | undefined;
          error?: string | null | undefined;
        }[];
        agent_summary: string | null;
        duration_ms: number;
        action_taken: string;
        tested_at: string;
      }[];
      totalCount: number;
    };
  };
  REGISTRY_MONITOR_CONNECTION_LIST: {
    input: { [x: string]: never };
    output: {
      items: {
        mapping: {
          id: string;
          organization_id: string;
          item_id: string;
          connection_id: string;
          auth_status: "none" | "needs_auth" | "authenticated";
          created_at: string;
          updated_at: string;
        };
        item: {
          [x: string]: unknown;
          id: string;
          title: string;
          server: {
            [x: string]: unknown;
            name: string;
            title?: string | undefined;
            description?: string | undefined;
            version?: string | undefined;
            websiteUrl?: string | undefined;
            icons?: { [x: string]: unknown; src: string }[] | undefined;
            remotes?:
              | {
                  [x: string]: unknown;
                  type?: string | undefined;
                  url?: string | undefined;
                  name?: string | undefined;
                  title?: string | undefined;
                  description?: string | undefined;
                }[]
              | undefined;
            packages?:
              | {
                  [x: string]: unknown;
                  identifier: string;
                  version?: string | undefined;
                }[]
              | undefined;
            repository?:
              | {
                  [x: string]: unknown;
                  url?: string | undefined;
                  source?: string | undefined;
                  subfolder?: string | undefined;
                }
              | undefined;
          };
          created_at: string;
          updated_at: string;
          name?: string | undefined;
          description?: string | null | undefined;
          _meta?:
            | {
                [x: string]: unknown;
                "mcp.studio"?:
                  | {
                      [x: string]: unknown;
                      verified?: boolean | undefined;
                      official?: boolean | undefined;
                      tags?: string[] | undefined;
                      categories?: string[] | undefined;
                      friendly_name?: string | null | undefined;
                      short_description?: string | null | undefined;
                      owner?: string | null | undefined;
                      readme?: string | null | undefined;
                      readme_url?: string | null | undefined;
                      has_remote?: boolean | undefined;
                      has_oauth?: boolean | undefined;
                      tools?:
                        | {
                            [x: string]: unknown;
                            name: string;
                            description?: string | null | undefined;
                          }[]
                        | undefined;
                    }
                  | undefined;
                "mcp.mesh"?:
                  | {
                      [x: string]: unknown;
                      verified?: boolean | undefined;
                      official?: boolean | undefined;
                      tags?: string[] | undefined;
                      categories?: string[] | undefined;
                      friendly_name?: string | null | undefined;
                      short_description?: string | null | undefined;
                      owner?: string | null | undefined;
                      readme?: string | null | undefined;
                      readme_url?: string | null | undefined;
                      has_remote?: boolean | undefined;
                      has_oauth?: boolean | undefined;
                      tools?:
                        | {
                            [x: string]: unknown;
                            name: string;
                            description?: string | null | undefined;
                          }[]
                        | undefined;
                    }
                  | undefined;
              }
            | undefined;
          is_public?: boolean | undefined;
          is_unlisted?: boolean | undefined;
          created_by?: string | undefined;
        } | null;
        remoteUrl: string | null;
        source: "request" | "store";
      }[];
    };
  };
  REGISTRY_MONITOR_CONNECTION_SYNC: {
    input: { [x: string]: never };
    output: { created: number; updated: number };
  };
  REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH: {
    input: {
      connectionId: string;
      authStatus: "none" | "needs_auth" | "authenticated";
    };
    output: { success: boolean };
  };
  SANDBOX_START: {
    input: {
      virtualMcpId: string;
      branch?: string | undefined;
      sandboxProviderKind?:
        | "agent-sandbox"
        | "user-desktop"
        | "cluster"
        | undefined;
    };
    output: {
      previewUrl: string | null;
      sandboxHandle: string;
      branch: string;
      isNewVm: boolean;
      sandboxProviderKind: "agent-sandbox" | "user-desktop";
    };
  };
  SANDBOX_DELETE: {
    input: {
      virtualMcpId: string;
      branch: string;
      sandboxProviderKind: "agent-sandbox" | "user-desktop" | "cluster";
      removeWorktree?: boolean | undefined;
    };
    output: { success: boolean };
  };
  GITHUB_LIST_USER_ORGS: {
    input: { connectionId: string };
    output: {
      installations: {
        installationId: number;
        login: string;
        avatarUrl: string;
        type: string;
      }[];
    };
  };
  GLOBAL_SEARCH: {
    input: {
      query: string;
      limit?: number | undefined;
      types?: "thread"[] | undefined;
    };
    output: {
      items: {
        type: "thread";
        id: string;
        title: string;
        created_at: string;
        updated_at: string;
        virtual_mcp_id: string | null;
        run_config: Record<string, unknown> | null;
        status: string | null;
      }[];
      totalCount: number;
    };
  };
}

export type StudioToolName = keyof StudioToolIO;
export type StudioToolInput<N extends StudioToolName> =
  StudioToolIO[N]["input"];
export type StudioToolOutput<N extends StudioToolName> =
  StudioToolIO[N]["output"];
