import Response from "../util/Response"; import { AxiosPromise, AxiosProgressEvent } from "axios"; export interface McpStartRunRequest { agent_id?: string | null; initial_message?: string | null; prompt?: string | null; run_type?: string; trigger_source?: string; background?: boolean; live_mode?: boolean; attachment_ids?: string[]; [key: string]: any; } /** * Client for the Glitch MCP paid facade (/mcp/v1). * * Authenticate with a Glitch user JWT or a title-scoped MCP token. The facade * enforces subscription, title permissions, scope, and approval guardrails on * every call; this client only forwards requests. */ declare class Mcp { /** Health/auth probe. Returns authenticated=false (200) when no credential is set. */ static authStatus(params?: Record): AxiosPromise>; /** List titles visible to the current user token or title-scoped MCP token. */ static listTitles(params?: Record): AxiosPromise>; /** Fetch safe, subscription-gated workspace context for a title. */ static titleContext(title_id: string, params?: Record): AxiosPromise>; /** Check subscription, trial, plan, and credit state for a title. */ static billing(title_id: string, params?: Record): AxiosPromise>; /** Start a paid Glitch Agent run for a title. */ static startRun(title_id: string, data?: McpStartRunRequest, params?: Record): AxiosPromise>; /** Fetch a durable run with status, actions, guidance, events, files, and report. */ static viewRun(title_id: string, run_id: string, params?: Record): AxiosPromise>; /** List user-visible timeline events for a run. */ static runEvents(title_id: string, run_id: string, params?: Record): AxiosPromise>; /** Fetch the human-friendly final or partial report for a run. */ static finalReport(title_id: string, run_id: string, params?: Record): AxiosPromise>; /** * Server-Sent Events URL for a run's live event stream. * * Returns the absolute URL to open with an EventSource/fetch reader; the * endpoint emits `status`, `run_event`, and a terminal `settled`/`timeout` event. */ static runStreamUrl(title_id: string, run_id: string, params?: Record): string; /** List downloadable files and hosted report artifacts for a run. */ static artifacts(title_id: string, run_id: string, params?: Record): AxiosPromise>; /** List proposed/guidance/approval/executed actions for a title. */ static listActions(title_id: string, params?: Record): AxiosPromise>; /** Approve a reviewable action. Execution remains guarded server-side. */ static approveAction(title_id: string, action_id: string, data?: object, params?: Record): AxiosPromise>; /** Reject a proposed or approval-needed action. */ static rejectAction(title_id: string, action_id: string, data?: object, params?: Record): AxiosPromise>; /** Execute an approved action. Public/paid/creator-facing work stays guarded. */ static executeAction(title_id: string, action_id: string, data?: object, params?: Record): AxiosPromise>; /** List open or answered guidance requests for a title or run. */ static listGuidance(title_id: string, params?: Record): AxiosPromise>; /** Answer a guidance request and resume the server-side workflow when possible. */ static answerGuidance(title_id: string, guidance_id: string, data?: object, params?: Record): AxiosPromise>; /** Get instructions for uploading a file (points at uploadFile below). */ static createUpload(title_id: string, data?: object, params?: Record): AxiosPromise>; /** * Upload a file (image, video, or document) to a title or run as multipart/form-data. * The facade re-checks the title scope, subscription, and allowed mime types. */ static uploadFile(title_id: string, file: File | Blob, data?: object, params?: Record, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise>; /** List MCP title tokens (user JWT only). */ static listTokens(title_id: string, params?: Record): AxiosPromise>; /** Create a revocable title-scoped MCP token (user JWT only). */ static createToken(title_id: string, data?: object, params?: Record): AxiosPromise>; /** Revoke a title-scoped MCP token (user JWT only). */ static revokeToken(title_id: string, token_id: string, params?: Record): AxiosPromise>; } export default Mcp;