export type SentryOptions = { /** * Auth token override. When omitted, falls back to `SENTRY_AUTH_TOKEN` * or `SENTRY_TOKEN` environment variables, then stored credentials. */ token?: string; /** * Sentry instance URL for self-hosted installations. * Defaults to `sentry.io`. Accepts with or without protocol * (e.g., `"sentry.example.com"` or `"https://sentry.example.com"`). */ url?: string; /** * Default organization slug. When set, commands that need an org * will use this instead of requiring it on every call. */ org?: string; /** * Default project slug. When set, commands that need a project * will use this instead of requiring it on every call. */ project?: string; /** * Return human-readable text instead of parsed JSON. * When `true`, the `run()` function returns a `string` instead of a parsed object. */ text?: boolean; /** * Working directory for this invocation. * Affects DSN auto-detection and project root resolution. * Defaults to `process.cwd()`. */ cwd?: string; /** * Extra HTTP headers to send with every request to a self-hosted Sentry * instance, for reverse proxies that require them (e.g., Google IAP, * Cloudflare Access). Same rules as `SENTRY_CUSTOM_HEADERS`, which this * option replaces when set (even when empty); ignored when targeting sentry.io. */ headers?: Record; /** * Abort signal for cancelling streaming commands. * When aborted, streaming iterables stop on the next poll cycle. * Consumer `break` in `for await...of` also triggers abort automatically. * Has no effect on non-streaming (Promise-based) commands. */ signal?: AbortSignal; }; export type AsyncChannel = AsyncIterable & { push(value: T): void; close(): void; error(err: Error): void; }; export declare class SentryError extends Error { readonly exitCode: number; readonly stderr: string; constructor(message: string, exitCode: number, stderr: string); } export declare function createSentrySDK(options?: SentryOptions): SentrySDK & { /** Run an arbitrary CLI command (escape hatch). Streaming flags return AsyncIterable. */ run(...args: string[]): Promise | AsyncIterable; }; export default createSentrySDK; // Auto-generated by script/generate-sdk.ts — DO NOT EDIT // Run `pnpm run generate:sdk` to regenerate. // --- Return types (derived from __jsonSchema) --- export type AgentConversationListResult = { conversationId: string; webUrl?: string; title?: string | null; flow: unknown[]; errors: number; llmCalls: number; toolCalls: number; totalTokens: number; totalCost: number; startTimestamp: number; endTimestamp: number; traceCount: number; traceIds: unknown[]; firstInput: string | null; lastOutput: string | null; user?: Record | null; toolNames: unknown[]; toolErrors: number; }; export type ReplayListResult = { /** Replay activity score */ activity?: number | null; /** Browser metadata */ browser?: Record | null; /** Dead click count */ count_dead_clicks?: number | null; /** Associated error count */ count_errors?: number | null; /** Info event count */ count_infos?: number | null; /** Rage click count */ count_rage_clicks?: number | null; /** Recording segment count */ count_segments?: number | null; /** Visited URL count */ count_urls?: number | null; /** Warning event count */ count_warnings?: number | null; /** Device metadata */ device?: Record | null; /** Distribution */ dist?: string | null; /** Replay duration in seconds */ duration?: number | null; /** Environment */ environment?: string | null; /** Linked error IDs */ error_ids: unknown[]; /** Replay finish timestamp */ finished_at?: string | null; /** Whether the current user has viewed the replay */ has_viewed?: boolean | null; /** Replay ID */ id: string; /** Linked info event IDs */ info_ids: unknown[]; /** Archived flag */ is_archived?: boolean | null; /** Operating system metadata */ os?: Record | null; /** OTA update metadata */ ota_updates?: Record | null; /** Platform */ platform?: string | null; /** Numeric project ID */ project_id?: string | null; /** Associated releases */ releases: unknown[]; /** SDK metadata */ sdk?: Record | null; /** Replay start timestamp */ started_at?: string | null; /** Replay tags */ tags: Record; /** Linked trace IDs */ trace_ids: unknown[]; /** Visited URLs */ urls: unknown[]; /** User metadata */ user?: Record | null; /** Linked warning event IDs */ warning_ids: unknown[]; }; export type ReplayViewResult = { /** Summarized replay activity */ activity: unknown[]; /** Browser metadata */ browser?: Record | null; /** Dead click count */ count_dead_clicks?: number | null; /** Associated error count */ count_errors?: number | null; /** Info event count */ count_infos?: number | null; /** Rage click count */ count_rage_clicks?: number | null; /** Recording segment count */ count_segments?: number | null; /** Visited URL count */ count_urls?: number | null; /** Warning event count */ count_warnings?: number | null; /** Device metadata */ device?: Record | null; /** Distribution */ dist?: string | null; /** Replay duration in seconds */ duration?: number | null; /** Environment */ environment?: string | null; /** Linked error IDs */ error_ids: unknown[]; /** Replay finish timestamp */ finished_at?: string | null; /** Whether the current user has viewed the replay */ has_viewed?: boolean | null; /** Replay ID */ id: string; /** Linked info event IDs */ info_ids: unknown[]; /** Archived flag */ is_archived?: boolean | null; /** Operating system metadata */ os?: Record | null; /** OTA update metadata */ ota_updates?: Record | null; /** Platform */ platform?: string | null; /** Numeric project ID */ project_id?: string | null; /** Associated releases */ releases: unknown[]; /** SDK metadata */ sdk?: Record | null; /** Replay start timestamp */ started_at?: string | null; /** Replay tags */ tags: Record; /** Linked trace IDs */ trace_ids: unknown[]; /** Visited URLs */ urls: unknown[]; /** User metadata */ user?: Record | null; /** Linked warning event IDs */ warning_ids: unknown[]; /** Replay click summaries */ clicks?: unknown[]; /** Replay type */ replay_type?: string | null; /** Organization slug */ org: string; /** Replay-related issues */ relatedIssues: unknown[]; /** Replay-related traces */ relatedTraces: unknown[]; }; export type RepoListResult = { /** Repository ID */ id: string; /** Repository name */ name: string; /** Repository URL */ url: string | null; /** Version control provider */ provider: Record; /** Integration status */ status: string; /** Creation date (ISO 8601) */ dateCreated?: string; /** Integration ID */ integrationId?: string; /** External slug (e.g. org/repo) */ externalSlug?: string | null; /** External ID */ externalId?: string | null; }; export type TeamListResult = { /** Team ID */ id: string; /** Team slug */ slug: string; /** Team name */ name: string; /** Creation date (ISO 8601) */ dateCreated?: string | null; /** Whether you are a member */ isMember?: boolean; /** Your role in the team */ teamRole?: string | null; /** Number of members */ memberCount?: number; }; export type IssueListResult = { /** Numeric issue ID */ id: string; /** Human-readable short ID (e.g. PROJ-ABC) */ shortId: string; /** Issue title */ title: string; /** Culprit string */ culprit?: string | null; /** Total event count */ count?: string; /** Number of affected users */ userCount?: number; /** First occurrence (ISO 8601) */ firstSeen?: string | null; /** Most recent occurrence (ISO 8601) */ lastSeen?: string | null; /** Severity level */ level?: string; /** Issue status */ status?: string; /** URL to the issue in Sentry */ permalink?: string; /** Project info */ project?: Record; /** Issue metadata */ metadata?: Record; /** Assigned user or team */ assignedTo?: Record | null; /** Triage priority */ priority?: string; /** Platform */ platform?: string; /** Issue substatus */ substatus?: string | null; /** Whether the issue is unhandled */ isUnhandled?: boolean; /** Seer AI fixability score (0-1) */ seerFixabilityScore?: number | null; }; export type IssueEventsResult = { /** Internal event ID */ id: string; /** Event type (error, default, transaction) */ "event.type": string; /** Group (issue) ID */ groupID?: string | null; /** UUID-format event ID */ eventID: string; /** Project ID */ projectID?: string; /** Event message */ message?: string; /** Event title */ title?: string; /** Source location (file:line) */ location?: string | null; /** Culprit function/module */ culprit?: string | null; /** User context */ user?: Record | null; /** Event tags */ tags?: unknown[]; /** Platform (python, javascript, etc.) */ platform?: string | null; /** ISO 8601 creation timestamp */ dateCreated?: string; /** Crash file URL */ crashFile?: string | null; /** Event metadata */ metadata?: Record; }; export type IssueViewResult = { /** Numeric issue ID */ id: string; /** Human-readable short ID (e.g. PROJ-ABC) */ shortId: string; /** Issue title */ title: string; /** Culprit string */ culprit?: string | null; /** Total event count */ count?: string; /** Number of affected users */ userCount?: number; /** First occurrence (ISO 8601) */ firstSeen?: string | null; /** Most recent occurrence (ISO 8601) */ lastSeen?: string | null; /** Severity level */ level?: string; /** Issue status */ status?: string; /** URL to the issue in Sentry */ permalink?: string; /** Project info */ project?: Record; /** Issue metadata */ metadata?: Record; /** Assigned user or team */ assignedTo?: Record | null; /** Triage priority */ priority?: string; /** Platform */ platform?: string; /** Issue substatus */ substatus?: string | null; /** Whether the issue is unhandled */ isUnhandled?: boolean; /** Seer AI fixability score (0-1) */ seerFixabilityScore?: number | null; /** Latest event for the issue (full detail). Select named fields with `--fields event.id,event.title` to avoid pulling the whole payload; the `request` entry may include live session data. */ event?: unknown | null; /** Organization slug */ org?: string | null; /** Related Session Replay IDs */ replayIds?: unknown[]; /** Trace context from the latest event's span tree */ trace?: Record | null; }; export type EventViewResult = { id?: string; groupID?: string | null; /** UUID-format event ID */ eventID: string; projectID?: string; message?: string | null; title?: string; location?: string | null; user?: Record | null; tags?: unknown[]; platform?: string; dateReceived?: string | null; contexts?: Record | null; size?: number | null; entries?: unknown[]; dist?: string | null; sdk?: Record | null; context?: Record | null; packages?: Record; type?: string; metadata?: Record; errors?: unknown[]; occurrence?: Record | null; _meta?: Record; crashFile?: string | null; culprit?: string | null; dateCreated?: string; fingerprints?: unknown[]; groupingConfig?: Record; startTimestamp?: number; endTimestamp?: number; measurements?: Record | null; breakdowns?: Record | null; release?: Record | null; userReport?: Record | null; sdkUpdates?: unknown[]; resolvedWith?: unknown[]; nextEventID?: string | null; previousEventID?: string | null; formatted?: Record; /** Trace context, or null when unavailable */ trace: Record | null; /** Event attachments; each includes metadata and an absolute authenticated download URL */ attachments: unknown[]; }; export type EventListResult = { /** Internal event ID */ id: string; /** Event type (error, default, transaction) */ "event.type": string; /** Group (issue) ID */ groupID?: string | null; /** UUID-format event ID */ eventID: string; /** Project ID */ projectID?: string; /** Event message */ message?: string; /** Event title */ title?: string; /** Source location (file:line) */ location?: string | null; /** Culprit function/module */ culprit?: string | null; /** User context */ user?: Record | null; /** Event tags */ tags?: unknown[]; /** Platform (python, javascript, etc.) */ platform?: string | null; /** ISO 8601 creation timestamp */ dateCreated?: string; /** Crash file URL */ crashFile?: string | null; /** Event metadata */ metadata?: Record; }; export type FeedbackListResult = { /** Numeric issue ID */ id: string; /** Human-readable short ID (e.g. PROJ-ABC) */ shortId: string; /** Issue title */ title: string; /** Culprit string */ culprit?: string | null; /** Total event count */ count?: string; /** Number of affected users */ userCount?: number; /** First occurrence (ISO 8601) */ firstSeen?: string | null; /** Most recent occurrence (ISO 8601) */ lastSeen?: string | null; /** Severity level */ level?: string; /** Issue status */ status?: string; /** URL to the issue in Sentry */ permalink?: string; /** Project info */ project?: Record; /** Feedback metadata */ metadata: Record; /** Assigned user or team */ assignedTo?: Record | null; /** Triage priority */ priority?: string; /** Platform */ platform?: string; /** Issue substatus */ substatus?: string | null; /** Whether the issue is unhandled */ isUnhandled?: boolean; /** Seer AI fixability score (0-1) */ seerFixabilityScore?: number | null; /** Issue category discriminator */ issueCategory: string; /** Issue type discriminator */ issueType: string; /** Whether the feedback has been read */ hasSeen?: boolean; /** Whether the latest event has attachments */ latestEventHasAttachments?: boolean; }; export type FeedbackViewResult = { /** Numeric issue ID */ id: string; /** Human-readable short ID (e.g. PROJ-ABC) */ shortId: string; /** Issue title */ title: string; /** Culprit string */ culprit?: string | null; /** Total event count */ count?: string; /** Number of affected users */ userCount?: number; /** First occurrence (ISO 8601) */ firstSeen?: string | null; /** Most recent occurrence (ISO 8601) */ lastSeen?: string | null; /** Severity level */ level?: string; /** Issue status */ status?: string; /** URL to the issue in Sentry */ permalink?: string; /** Project info */ project?: Record; /** Feedback metadata */ metadata: Record; /** Assigned user or team */ assignedTo?: Record | null; /** Triage priority */ priority?: string; /** Platform */ platform?: string; /** Issue substatus */ substatus?: string | null; /** Whether the issue is unhandled */ isUnhandled?: boolean; /** Seer AI fixability score (0-1) */ seerFixabilityScore?: number | null; /** Issue category discriminator */ issueCategory: string; /** Issue type discriminator */ issueType: string; /** Whether the feedback has been read */ hasSeen?: boolean; /** Whether the latest event has attachments */ latestEventHasAttachments?: boolean; /** Organization slug */ org: string | null; /** Latest feedback event */ event: unknown | null; /** Related Session Replay IDs */ replayIds: unknown[]; /** Attachments on the latest feedback event */ attachments: unknown[]; }; export type FeedbackResolveResult = { /** Numeric issue ID */ id: string; /** Human-readable short ID (e.g. PROJ-ABC) */ shortId: string; /** Issue title */ title: string; /** Culprit string */ culprit?: string | null; /** Total event count */ count?: string; /** Number of affected users */ userCount?: number; /** First occurrence (ISO 8601) */ firstSeen?: string | null; /** Most recent occurrence (ISO 8601) */ lastSeen?: string | null; /** Severity level */ level?: string; /** Issue status */ status?: string; /** URL to the issue in Sentry */ permalink?: string; /** Project info */ project?: Record; /** Feedback metadata */ metadata: Record; /** Assigned user or team */ assignedTo?: Record | null; /** Triage priority */ priority?: string; /** Platform */ platform?: string; /** Issue substatus */ substatus?: string | null; /** Whether the issue is unhandled */ isUnhandled?: boolean; /** Seer AI fixability score (0-1) */ seerFixabilityScore?: number | null; /** Issue category discriminator */ issueCategory: string; /** Issue type discriminator */ issueType: string; /** Whether the feedback has been read */ hasSeen?: boolean; /** Whether the latest event has attachments */ latestEventHasAttachments?: boolean; }; export type FeedbackUnresolveResult = { /** Numeric issue ID */ id: string; /** Human-readable short ID (e.g. PROJ-ABC) */ shortId: string; /** Issue title */ title: string; /** Culprit string */ culprit?: string | null; /** Total event count */ count?: string; /** Number of affected users */ userCount?: number; /** First occurrence (ISO 8601) */ firstSeen?: string | null; /** Most recent occurrence (ISO 8601) */ lastSeen?: string | null; /** Severity level */ level?: string; /** Issue status */ status?: string; /** URL to the issue in Sentry */ permalink?: string; /** Project info */ project?: Record; /** Feedback metadata */ metadata: Record; /** Assigned user or team */ assignedTo?: Record | null; /** Triage priority */ priority?: string; /** Platform */ platform?: string; /** Issue substatus */ substatus?: string | null; /** Whether the issue is unhandled */ isUnhandled?: boolean; /** Seer AI fixability score (0-1) */ seerFixabilityScore?: number | null; /** Issue category discriminator */ issueCategory: string; /** Issue type discriminator */ issueType: string; /** Whether the feedback has been read */ hasSeen?: boolean; /** Whether the latest event has attachments */ latestEventHasAttachments?: boolean; }; export type FeedbackSpamResult = { /** Numeric issue ID */ id: string; /** Human-readable short ID (e.g. PROJ-ABC) */ shortId: string; /** Issue title */ title: string; /** Culprit string */ culprit?: string | null; /** Total event count */ count?: string; /** Number of affected users */ userCount?: number; /** First occurrence (ISO 8601) */ firstSeen?: string | null; /** Most recent occurrence (ISO 8601) */ lastSeen?: string | null; /** Severity level */ level?: string; /** Issue status */ status?: string; /** URL to the issue in Sentry */ permalink?: string; /** Project info */ project?: Record; /** Feedback metadata */ metadata: Record; /** Assigned user or team */ assignedTo?: Record | null; /** Triage priority */ priority?: string; /** Platform */ platform?: string; /** Issue substatus */ substatus?: string | null; /** Whether the issue is unhandled */ isUnhandled?: boolean; /** Seer AI fixability score (0-1) */ seerFixabilityScore?: number | null; /** Issue category discriminator */ issueCategory: string; /** Issue type discriminator */ issueType: string; /** Whether the feedback has been read */ hasSeen?: boolean; /** Whether the latest event has attachments */ latestEventHasAttachments?: boolean; }; export type LogListResult = { /** Unique log entry ID */ "sentry.item_id": string; /** Log timestamp (ISO 8601) */ timestamp: string; /** Nanosecond-precision timestamp */ timestamp_precise: number; /** Log message */ message?: string | null; /** Severity level (error, warning, info, debug) */ severity?: string | null; /** Trace ID for correlation */ trace?: string | null; }; export type MonitorListResult = { /** Monitor ID */ id: string; /** Monitor slug */ slug: string; /** Monitor name */ name: string; /** Monitor status (e.g. active, disabled) */ status: string; /** Whether the monitor is muted */ isMuted?: boolean; /** Schedule configuration */ config?: Record; /** Creation date (ISO 8601) */ dateCreated?: string; /** Owning project */ project?: Record; }; export type SpanListResult = { /** Span ID */ id: string; /** Parent span ID */ parent_span?: string | null; /** Span operation (e.g. http.client, db) */ "span.op"?: string | null; /** Span description */ description?: string | null; /** Duration (ms) */ "span.duration"?: number | null; /** Timestamp (ISO 8601) */ timestamp: string; /** Project slug */ project: string; /** Transaction name */ transaction?: string | null; /** Trace ID */ trace: string; }; export type TraceListResult = { /** Trace ID */ trace: string; /** Span ID of the root span */ id: string; /** Transaction name */ transaction: string; /** Timestamp (ISO 8601) */ timestamp: string; /** Duration (ms) */ "span.duration": number; /** Project slug */ project: string; }; export type TrialListResult = { /** Trial category (e.g. seerUsers, seerAutofix) */ category: string; /** Start date (ISO 8601) */ startDate: string | null; /** End date (ISO 8601) */ endDate: string | null; /** Reason code */ reasonCode: number; /** Whether the trial has started */ isStarted: boolean; /** Trial duration in days */ lengthDays: number | null; }; // --- Parameter types --- export type AlertIssuesListParams = { /** / (all projects), /, or (search) */ orgProject?: string; /** Maximum number of issue alert rules to list */ limit?: number; /** Filter rules by name */ query?: string; /** Pagination cursor (use "next" for next page, "prev" for previous) */ cursor?: string; }; export type AlertIssuesViewParams = { /** Issue alert rule ID or name */ orgProjectRuleIdOrName?: string; }; export type AlertIssuesCreateParams = { /** /, auto-detected project, or (search) */ target?: string; /** Rule name */ name: string; /** Condition object JSON (repeatable, or pass one JSON array) */ condition?: Array; /** Action object JSON (repeatable, or pass one JSON array) */ action?: Array; /** Frequency in minutes (default: 30) */ frequency?: number; /** Environment filter */ environment?: string; /** Filter object JSON (repeatable, or pass one JSON array) */ filter?: Array; /** Filter match mode: all or any */ filterMatch?: string; /** Owner (team:user style value accepted by Sentry API) */ owner?: string; /** Show what would happen without making changes */ dryRun?: boolean; }; export type AlertIssuesDeleteParams = { /** Rule id or name (same as view) */ orgProjectRuleIdOrName?: string; /** Skip confirmation prompt */ yes?: boolean; /** Force the operation without confirmation */ force?: boolean; /** Show what would happen without making changes */ dryRun?: boolean; }; export type AlertIssuesEditParams = { /** Rule id or name (same as view) */ orgProjectRuleIdOrName?: string; /** New rule name */ name?: string; /** Rule status: active or disabled */ status?: string; /** Condition object JSON (repeatable, or pass one JSON array) */ condition?: Array; /** Action object JSON (repeatable, or pass one JSON array) */ action?: Array; /** Frequency in minutes */ frequency?: string; /** Environment value (pass empty string to clear) */ environment?: string; /** Filter object JSON (repeatable, or pass one JSON array) */ filter?: Array; /** Filter match mode: all or any */ filterMatch?: string; /** Owner value (pass empty string to clear) */ owner?: string; }; export type AlertMetricsListParams = { /** /, / (project ignored), or (search) */ target?: string; /** Maximum number of metric alert rules to list */ limit?: number; /** Filter rules by name */ query?: string; /** Pagination cursor (use "next" for next page, "prev" for previous) */ cursor?: string; }; export type AlertMetricsViewParams = { /** Metric alert rule ID or name */ orgRuleIdOrName?: string; }; export type AlertMetricsCreateParams = { /** Target project or organization */ target?: string; /** Rule name */ name: string; /** Metric query filter string */ query: string; /** Aggregate expression (for example count(), p95(span.duration)) */ aggregate: string; /** Dataset: errors (error-events), sessions, events, spans, metrics (transaction(s) routes to spans) */ dataset: string; /** Evaluation window in minutes */ timeWindow: string; /** Trigger object JSON (repeatable, or pass one JSON array) */ trigger?: Array; /** Project slug filter (repeatable or comma-separated) */ project?: Array; /** Environment filter */ environment?: string; /** Owner value accepted by Sentry API */ owner?: string; /** Show what would happen without making changes */ dryRun?: boolean; }; export type AlertMetricsDeleteParams = { /** Rule id or name (same as view) */ orgRuleIdOrName?: string; /** Skip confirmation prompt */ yes?: boolean; /** Force the operation without confirmation */ force?: boolean; /** Show what would happen without making changes */ dryRun?: boolean; }; export type AlertMetricsEditParams = { /** Rule id or name (same as view) */ orgRuleIdOrName?: string; /** New rule name */ name?: string; /** active or disabled */ status?: string; /** Metric query filter */ query?: string; /** Aggregate expression */ aggregate?: string; /** Dataset: errors (error-events), sessions, events, spans, metrics (transaction(s) routes to spans) */ dataset?: string; /** Evaluation window in minutes */ timeWindow?: string; /** Trigger object JSON (repeatable, or pass one JSON array) */ trigger?: Array; /** Project slug filter (repeatable or comma-separated) */ project?: Array; /** Environment value (pass empty string to clear) */ environment?: string; /** Owner value (pass empty string to clear) */ owner?: string; }; export type AuthLoginParams = { /** Authenticate using an API token instead of OAuth */ token?: string; /** Timeout for OAuth flow in seconds (default: 900) */ timeout?: number; /** Re-authenticate without prompting */ force?: boolean; /** Sentry instance URL to authenticate against (e.g. https://sentry.example.com). Required for self-hosted; defaults to SaaS (https://sentry.io). */ url?: string; /** Request only read-only OAuth scopes (project:read, org:read, event:read, member:read, team:read). Useful for handing tokens to AI agents or CI jobs that should not be able to mutate Sentry state. */ readOnly?: boolean; /** Request specific OAuth scopes (repeatable, comma-separated). E.g. --scope project:read --scope org:read. Overrides the default scope set. */ scope?: Array; }; export type AuthRefreshParams = { /** Force refresh even if the access token is still valid */ force?: boolean; /** Re-authenticate with read-only OAuth scopes (project:read, org:read, event:read, member:read, team:read) */ readOnly?: boolean; /** Re-authenticate with specific OAuth scopes (repeatable, comma-separated). E.g. --scope project:read --scope org:read */ scope?: Array; }; export type AuthStatusParams = { /** Show the stored token (masked by default) */ showToken?: boolean; }; export type BuildUploadParams = { /** Build configuration for the upload (defaults to the current version) */ buildConfiguration?: string; /** Release notes for the build */ releaseNotes?: string; /** Install group(s) for this build (repeatable); builds sharing a group show updates for each other */ installGroup?: Array; /** VCS commit SHA (defaults to the current commit) */ headSha?: string; /** VCS base commit SHA (defaults to the merge-base with the base ref) */ baseSha?: string; /** VCS provider (defaults to the current remote's provider) */ vcsProvider?: string; /** Head repository name, e.g. owner/repo (defaults to the current) */ headRepoName?: string; /** Base repository name, e.g. owner/repo (for forks) */ baseRepoName?: string; /** Head branch/reference (defaults to the current branch) */ headRef?: string; /** Base branch/reference (defaults to the merge-base tracking ref) */ baseRef?: string; /** Pull request number (auto-detected in pull_request GitHub Actions runs) */ prNumber?: string; /** Force collecting git metadata even outside CI (conflicts with --no-git-metadata) */ forceGitMetadata?: boolean; /** Disable automatic git metadata collection */ noGitMetadata?: boolean; }; export type BuildDownloadParams = { /** ID of the build to download */ buildId?: string; /** Output path (default: preprod_artifact_. in the current directory) */ output?: string; }; export type CliCompletionParams = { /** Shell to generate completions for (bash, zsh, or fish) */ shell?: string; }; export type CliDefaultsParams = { /** Clear the specified default, or all defaults if no key is given */ clear?: boolean; /** Skip confirmation prompt */ yes?: boolean; /** Force the operation without confirmation */ force?: boolean; }; export type CliFixParams = { /** Show what would be fixed without making changes */ dryRun?: boolean; }; export type CliImportParams = { /** Skip confirmation prompt */ yes?: boolean; /** Show what would happen without making changes */ dryRun?: boolean; /** Explicitly trust this URL (bypasses same-file trust check) */ url?: string; /** Skip token validation against the Sentry API */ skipValidation?: boolean; }; export type CliSetupParams = { /** Install the binary from a temp location to the system path */ install?: boolean; /** Installation method (curl, npm, pnpm, bun, yarn) */ method?: string; /** Release channel to persist (stable or nightly) */ channel?: string; /** Skip PATH modification */ noModifyPath?: boolean; /** Skip shell completion installation */ noCompletions?: boolean; /** Skip agent skill installation for AI coding assistants */ noAgentSkills?: boolean; /** Suppress output (for scripted usage) */ quiet?: boolean; }; export type CliUninstallParams = { /** Keep the config directory (~/.sentry) and auth tokens */ keepConfig?: boolean; /** Skip confirmation prompt */ yes?: boolean; /** Force the operation without confirmation */ force?: boolean; /** Show what would happen without making changes */ dryRun?: boolean; }; export type CliUpgradeParams = { /** Specific version (e.g. 0.5.0), or "nightly"/"stable" to switch channel; omit to update within current channel */ version?: string; /** Check for updates without installing */ check?: boolean; /** Force upgrade even if already on the latest version */ force?: boolean; /** Upgrade using only cached version info and patches (no network) */ offline?: boolean; /** Skip agent skill installation for AI coding assistants */ noAgentSkills?: boolean; /** Installation method to use (curl, brew, npm, pnpm, bun, yarn) */ method?: string; }; export type CodeMappingsUploadParams = { /** Path to the code mappings JSON file */ path?: string; /** Repository name (e.g., owner/repo). Auto-detected from git remote if omitted. */ repo?: string; /** Default branch name. Auto-detected from git remote HEAD if omitted. */ defaultBranch?: string; }; export type AgentConversationListParams = { /** Organization slug */ org?: string; /** Number of conversations (1-1000) */ limit?: number; /** Search query */ query?: string; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type AgentConversationViewParams = { /** [/] - Org (optional) and conversation ID */ orgConversationId?: string; }; export type DartSymbolMapUploadParams = { /** Path to the dart symbol map JSON file */ path?: string; /** Debug ID (UUID) from the companion native debug file */ debugId: string; /** Validate the file without uploading (dry-run) */ noUpload?: boolean; }; export type DebugFilesCheckParams = { /** Path to the debug information file */ path?: string; }; export type DebugFilesFindParams = { /** Only consider debug files of the given type (repeatable). Default: all */ type?: Array; /** Do not look for debug files in well-known locations */ noWellKnown?: boolean; /** Do not look for debug files in the current directory */ noCwd?: boolean; /** Add a directory to search recursively (repeatable) */ path?: Array; }; export type DebugFilesUploadParams = { /** Only upload files of this type (repeatable): dsym, elf, pe, pdb, portablepdb, wasm, breakpad, sourcebundle, jvm */ type?: Array; /** Only upload the object with this debug id (repeatable) */ id?: Array; /** Fail if any --id value was not found among scanned files */ requireAll?: boolean; /** Do not upload files whose only feature is debug/symbol info */ noDebug?: boolean; /** Do not upload files whose only feature is unwind info */ noUnwind?: boolean; /** Do not upload files whose only feature is source info */ noSources?: boolean; /** Build and upload a source bundle for each file with debug info */ includeSources?: boolean; /** Compute and upload Unity IL2CPP line mappings for each scanned file */ il2cppMapping?: boolean; /** Also scan Xcode's DerivedData folder (macOS only) */ derivedData?: boolean; /** Do not scan inside .zip archives */ noZips?: boolean; /** Scan and print what would be uploaded without uploading */ noUpload?: boolean; /** Wait for server-side processing and report any errors */ wait?: boolean; /** Wait up to this many seconds for server-side processing */ waitFor?: string; }; export type DebugFilesPrintSourcesParams = { /** Path to the debug information file */ path?: string; }; export type DebugFilesBundleSourcesParams = { /** Path to the debug information file */ path?: string; /** Output path for the source bundle ZIP (default: .src.zip) */ output?: string; }; export type DebugFilesBundleJvmParams = { /** Directory containing JVM source files */ path?: string; /** Output directory for the bundle ZIP */ output: string; /** Debug ID (UUID) to stamp on the bundle */ debugId: string; /** Additional directory names to exclude (repeatable) */ exclude?: Array; }; export type DashboardListParams = { /** Maximum number of dashboards to list */ limit?: number; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type DashboardViewParams = { /** Auto-refresh interval in seconds (default: 60, min: 10) */ refresh?: string; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Graphics renderer (defaults to auto; falls back to auto when unavailable) */ renderer?: "auto" | "kitty" | "sixel"; /** Use the terminal-native graphics width (may fall back to ASCII for very large dashboards) */ noGraphicsCap?: boolean; }; export type DashboardWidgetAddParams = { /** Display type (big_number, line, area, bar, table, stacked_area, top_n, text, categorical_bar, details, wheel, rage_and_dead_clicks, server_tree, agents_traces_table) */ display: string; /** Widget dataset (default: spans). Accepts canonical names and API synonyms: spans, error-events/errors, tracemetrics/metrics, logs, issue */ dataset?: string; /** Aggregate expression (e.g. count, p95:span.duration) */ query?: Array; /** Search conditions filter (e.g. is:unresolved) */ where?: string; /** Group-by column (repeatable) */ groupBy?: Array; /** Order by (prefix - for desc, e.g. -count) */ sort?: string; /** Result limit */ limit?: string; /** Grid column position (0-based, 0–5) */ col?: string; /** Grid row position (0-based) */ row?: string; /** Widget width in grid columns (1–6) */ width?: string; /** Widget height in grid rows (min 1) */ height?: string; /** Layout mode: sequential (append in order) or dense (fill gaps) */ layout?: string; }; export type DashboardWidgetEditParams = { /** Widget index (0-based) */ index?: string; /** Widget title to match */ title?: string; /** New widget title */ newTitle?: string; /** Display type (big_number, line, area, bar, table, stacked_area, top_n, text, categorical_bar, details, wheel, rage_and_dead_clicks, server_tree, agents_traces_table) */ display?: string; /** Widget dataset (default: spans). Accepts canonical names and API synonyms: spans, error-events/errors, tracemetrics/metrics, logs, issue */ dataset?: string; /** Aggregate expression (e.g. count, p95:span.duration) */ query?: Array; /** Search conditions filter (e.g. is:unresolved) */ where?: string; /** Group-by column (repeatable) */ groupBy?: Array; /** Order by (prefix - for desc, e.g. -count) */ sort?: string; /** Result limit */ limit?: string; /** Grid column position (0-based, 0–5) */ col?: string; /** Grid row position (0-based) */ row?: string; /** Widget width in grid columns (1–6) */ width?: string; /** Widget height in grid rows (min 1) */ height?: string; }; export type DashboardWidgetDeleteParams = { /** Widget index (0-based) */ index?: string; /** Widget title to match */ title?: string; /** Skip confirmation prompt */ yes?: boolean; /** Force the operation without confirmation */ force?: boolean; /** Show what would happen without making changes */ dryRun?: boolean; }; export type DashboardRevisionsParams = { /** Maximum number of revisions to list */ limit?: number; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type DashboardRestoreParams = { /** Revision ID to restore */ revision: string; }; export type DocsListParams = { /** Maximum matches to return (1-20) */ limit?: number; }; export type DsnListParams = { /** / (all projects), /, or (search) */ orgProject?: string; /** Maximum number of DSNs to list */ limit?: number; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type OrgListParams = { /** Maximum number of organizations to list */ limit?: number; }; export type OrgViewParams = { /** Organization slug (optional if auto-detected) */ org?: string; }; export type PlatformListParams = { /** Filter platforms by substring */ search?: string; }; export type ProjectCreateParams = { /** Team to create the project under */ team?: string; /** Show what would happen without making changes */ dryRun?: boolean; }; export type ProjectDeleteParams = { /** / or (search across orgs) */ orgProject?: string; /** Skip confirmation prompt */ yes?: boolean; /** Force the operation without confirmation */ force?: boolean; /** Show what would happen without making changes */ dryRun?: boolean; }; export type ProjectListParams = { /** / (all projects), /, or (search) */ orgProject?: string; /** Maximum number of projects to list */ limit?: number; /** Filter by platform (e.g., javascript, python) */ platform?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type ProjectViewParams = { /** /, (search), or omit for auto-detect */ orgProject?: string; }; export type ProguardUploadParams = { /** Force a specific UUID instead of computing from file content (only valid with a single file) */ uuid?: string; /** Compute and print UUIDs without uploading (dry-run) */ noUpload?: boolean; /** Require at least one mapping file (error if none provided) */ requireOne?: boolean; }; export type ProguardUuidParams = { /** Path to the ProGuard mapping file */ path?: string; }; export type ReactNativeGradleParams = { /** Path to the sourcemap to upload */ sourcemap: string; /** Path to the bundle to upload */ bundle: string; /** Release version to publish to */ release?: string; /** Distribution(s) to publish (repeatable; requires --release) */ dist?: Array; /** Wait for the server to fully process the uploaded files */ wait?: boolean; /** Wait for processing, but at most this many seconds */ waitFor?: string; }; export type ReactNativeXcodeParams = { /** Run even in a debug configuration */ force?: boolean; /** Fetch sourcemaps from the packager on simulator builds */ allowFetch?: boolean; /** Packager URL to fetch from (default: http://127.0.0.1:8081/) */ fetchFrom?: string; /** Path to the react-native-xcode.sh build script */ buildScript?: string; /** Distribution(s) to publish (repeatable) */ dist?: Array; /** Wait for the server to fully process the uploaded files */ wait?: boolean; /** Wait for processing, but at most this many seconds */ waitFor?: string; /** Don't read the release from Xcode project files */ noAutoRelease?: boolean; /** Run the C preprocessor over Info.plist (INFOPLIST_PREPROCESS) */ allowXcodeInfoplistPreprocessing?: boolean; }; export type ReplayListParams = { /** /, /, or (search) */ orgProject?: string; /** Number of replays (1-1000) */ limit?: number; /** Search query (Sentry replay search syntax) */ query?: string; /** Filter by environment (repeatable, comma-separated) */ environment?: Array; /** Sort by: date, oldest, duration, errors, activity, or a raw replay sort field */ sort?: string; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type ReplayDownloadParams = { /** Output path (default: .rrweb.json in the current directory) */ output?: string; }; export type ReleaseListParams = { /** / (all projects), /, or (search) */ orgProject?: string; /** Maximum number of releases to list */ limit?: number; /** Sort: date, sessions, users, crash_free_sessions (cfs), crash_free_users (cfu) */ sort?: string; /** Filter by environment (repeatable, comma-separated) */ environment?: Array; /** Health stats period (e.g., 24h, 7d, 14d, 90d) */ period?: string; /** Filter by status: open (default) or archived */ status?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type ReleaseViewParams = { /** [/] - Release version to view */ orgVersion?: string; }; export type ReleaseCreateParams = { /** [/] - Release version to create */ orgVersion?: string; /** Associate with project(s), comma-separated */ project?: string; /** Immediately finalize the release (set dateReleased) */ finalize?: boolean; /** Git ref (branch or tag name) */ ref?: string; /** URL to the release source */ url?: string; /** Show what would happen without making changes */ dryRun?: boolean; }; export type ReleaseFinalizeParams = { /** [/] - Release version to finalize */ orgVersion?: string; /** Custom release timestamp (ISO 8601). Defaults to now. */ released?: string; /** URL for the release */ url?: string; /** Show what would happen without making changes */ dryRun?: boolean; }; export type ReleaseDeleteParams = { /** [/] - Release version to delete */ orgVersion?: string; /** Skip confirmation prompt */ yes?: boolean; /** Force the operation without confirmation */ force?: boolean; /** Show what would happen without making changes */ dryRun?: boolean; }; export type ReleaseArchiveParams = { /** [/] - Release version to archive */ orgVersion?: string; /** Show what would happen without making changes */ dryRun?: boolean; }; export type ReleaseRestoreParams = { /** [/] - Release version to restore */ orgVersion?: string; /** Show what would happen without making changes */ dryRun?: boolean; }; export type ReleaseDeployParams = { /** [/] - Release version */ orgVersion?: string; /** Deploy environment (e.g. production) */ environment?: string; /** Optional deploy name (quote multi-word names, e.g. "Deploy #42") */ name?: string; /** URL for the deploy */ url?: string; /** Deploy start time (ISO 8601) */ started?: string; /** Deploy finish time (ISO 8601) */ finished?: string; /** Deploy duration in seconds (sets started = now - time, finished = now) */ time?: string; /** Show what would happen without making changes */ dryRun?: boolean; }; export type ReleaseDeploysParams = { /** [/] - Release version */ orgVersion?: string; }; export type ReleaseSetCommitsParams = { /** [/] - Release version */ orgVersion?: string; /** Auto-discover commits via repository integration (needs local git checkout) */ auto?: boolean; /** Read commits from local git history */ local?: boolean; /** Clear all commits from the release */ clear?: boolean; /** Explicit commit as REPO@SHA or REPO@PREV..SHA (comma-separated) */ commit?: string; /** Filter commits to these paths (comma-separated). Implies --local. */ path?: string; /** Read the local range ..HEAD (e.g. previous release tag). Implies --local. */ from?: string; /** Number of commits to read with --local */ initialDepth?: number; }; export type RepoListParams = { /** / (all projects), /, or (search) */ orgProject?: string; /** Maximum number of repositories to list */ limit?: number; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type TeamListParams = { /** / (all projects), /, or (search) */ orgProject?: string; /** Maximum number of teams to list */ limit?: number; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type IssueListParams = { /** / (all projects), /, or (search) */ orgProject?: string; /** Search query (Sentry syntax, implicit AND, no OR operator) */ query?: string; /** Maximum number of issues to list */ limit?: number; /** Sort by: recommended, date, new, freq, user (default: recommended on sentry.io, else date) */ sort?: string; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Pagination cursor (use "next" for next page, "prev" for previous) */ cursor?: string; }; export type IssueEventsParams = { /** Issue: @latest, @most_frequent, /ID, /#ID, -suffix, ID, or suffix */ issue?: string; /** Number of events (1-1000) */ limit?: number; /** Search query (Sentry search syntax) */ query?: string; /** Include full event body (stacktraces) */ full?: boolean; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type IssueExplainParams = { /** Force new analysis even if one exists */ force?: boolean; }; export type IssuePlanParams = { /** Issue: @latest, @most_frequent, /ID, /#ID, -suffix, ID, or suffix */ issue?: string; /** Force new plan even if one exists */ force?: boolean; }; export type IssueViewParams = { /** Allow --web to open more than 5 issues */ force?: boolean; /** Span tree depth limit (number, "all" for unlimited, "no" to disable) */ spans?: number; }; export type IssueResolveParams = { /** Issue: @latest, @most_frequent, /ID, /#ID, -suffix, ID, or suffix */ issue?: string; /** Resolve in a release, next release, or commit ('' | '@next' | '@commit' | '@commit:@') */ in?: string; }; export type IssueUnresolveParams = { /** Issue: @latest, @most_frequent, /ID, /#ID, -suffix, ID, or suffix */ issue?: string; }; export type IssueArchiveParams = { /** Issue: @latest, @most_frequent, /ID, /#ID, -suffix, ID, or suffix */ issue?: string; /** Condition for unarchival: forever, auto, 30m, 10x, 10u, 10x/5m, etc. */ until?: string; }; export type IssueMergeParams = { /** Prefer this issue as the canonical parent (included in the merge if not already listed) */ into?: string; }; export type EventViewParams = { /** Span tree depth limit (number, "all" for unlimited, "no" to disable) */ spans?: number; }; export type EventListParams = { /** Issue: @latest, @most_frequent, /ID, /#ID, -suffix, ID, or suffix */ issue?: string; /** Number of events (1-1000) */ limit?: number; /** Search query (Sentry search syntax) */ query?: string; /** Include full event body (stacktraces) */ full?: boolean; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type EventSendParams = { /** Event message (repeat for multi-line) */ message?: Array; /** Arguments for message template (repeat for multiple) */ messageArg?: Array; /** Event severity level */ level?: "debug" | "info" | "warning" | "error" | "fatal"; /** Release version */ release?: string; /** Distribution identifier */ dist?: string; /** Environment name (e.g. production, staging) */ env?: string; /** Platform identifier (default: other) */ platform?: string; /** Tag as KEY:VALUE (repeat for multiple) */ tag?: Array; /** Extra data as KEY:VALUE (repeat for multiple) */ extra?: Array; /** User info as KEY:VALUE — id, email, username, ip_address, or custom */ user?: Array; /** Custom fingerprint part (repeat for multiple) */ fingerprint?: Array; /** Event timestamp (Unix epoch, ISO 8601, or RFC 2822) */ timestamp?: string; /** Do not include environment variables in the event */ noEnviron?: boolean; /** Path to a log file — last 100 lines are attached as breadcrumbs */ logfile?: string; /** Parse 'CATEGORY: message' prefixes from logfile breadcrumbs */ withCategories?: boolean; /** Send file contents as-is without parsing */ raw?: boolean; }; export type ExploreParams = { /** Target: /, /, or . Auto-detected if omitted. */ target?: string; /** API field or aggregate (repeatable). E.g., title, "count()", "p50(span.duration)" */ field?: Array; /** Metric name for --dataset metrics. Auto-resolves type/unit via API. */ metric?: string; /** Aggregation for --metric (sum, avg, count, p50, p95, etc.) */ agg?: string; /** Dataset to query (errors, spans, metrics, logs, replays; transaction(s) routes to spans) */ dataset?: string; /** Search query (Sentry search syntax) */ query?: string; /** Sort field (prefix with - for desc, e.g., "-count()") */ sort?: string; /** Environment filter (repeatable, comma-separated) */ environment?: Array; /** Number of rows (1-1000) */ limit?: number; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type FeedbackListParams = { /** /, /, or (search) */ orgProject?: string; /** Mailbox: unresolved, resolved, spam, or all */ status?: "unresolved" | "resolved" | "spam" | "all"; /** Number of feedback items (1-1000) */ limit?: number; /** Search query (Sentry issue search syntax) */ query?: string; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type FeedbackViewParams = { /** Feedback: @latest, numeric ID, short ID, /SHORT-ID, or // */ feedback?: string; }; export type FeedbackResolveParams = { /** Feedback: @latest, numeric ID, short ID, /SHORT-ID, or // */ feedback?: string; }; export type FeedbackUnresolveParams = { /** Feedback: @latest, numeric ID, short ID, /SHORT-ID, or // */ feedback?: string; }; export type FeedbackSpamParams = { /** Feedback: @latest, numeric ID, short ID, /SHORT-ID, or // */ feedback?: string; }; export type LogListParams = { /** Number of log entries (1-1000) */ limit?: number; /** Filter query (e.g., "severity:error", "project:backend", "project:[a,b]") */ query?: string; /** Stream logs (optionally specify poll interval in seconds) */ follow?: string; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Sort order: "newest" (default) or "oldest" */ sort?: string; }; export type MonitorRunParams = { /** DSN to send check-ins to (overrides SENTRY_DSN env var) */ dsn?: string; /** Environment of the monitor */ environment?: string; /** Upsert the monitor with this crontab schedule (e.g. '0 * * * *') */ schedule?: string; /** Minutes after the expected check-in before it is missed (requires --schedule) */ checkInMargin?: string; /** Minutes a check-in may run before timing out (requires --schedule) */ maxRuntime?: string; /** Timezone of the schedule, tz database string (requires --schedule) */ timezone?: string; /** Consecutive failures before an issue is created (requires --schedule) */ failureIssueThreshold?: string; /** Consecutive successes before an issue is resolved (requires --schedule) */ recoveryThreshold?: string; }; export type MonitorListParams = { /** / (all projects), /, or (search) */ orgProject?: string; /** Maximum number of monitors to list */ limit?: number; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type SnapshotsDiffParams = { /** Path to the baseline image directory */ baseDir?: string; /** Path to the head image directory */ headDir?: string; /** Directory for diff mask images (default: ./diff-output/) */ output?: string; /** Pixel color difference threshold (0.0-1.0) */ threshold?: number; /** Disable antialiasing detection */ noAntialiasing?: boolean; /** Exit non-zero if any diffs (changed/added/removed/errored) are found */ failOnDiff?: boolean; /** Treat images missing from head as skipped instead of removed */ selective?: boolean; }; export type SnapshotsDownloadParams = { /** App identifier (e.g. my-app) to resolve the latest baseline; mutually exclusive with --snapshot-id */ appId?: string; /** Direct snapshot artifact ID; mutually exclusive with --app-id */ snapshotId?: string; /** Git branch filter (only with --app-id) */ branch?: string; /** Directory for extracted images (default: ./snapshots-base/) */ output?: string; }; export type SnapshotsUploadParams = { /** Path to the folder containing images to upload */ path?: string; /** The application identifier */ appId: string; /** Only report an image as changed when its difference exceeds this fraction (0.0–1.0, e.g. 0.01 = 1%) */ diffThreshold?: string; /** This upload contains only a subset of images (removals/renames won't be detected on PRs) */ selective?: boolean; /** Comma-separated list of all image names in the full suite (for selective uploads; implies --selective) */ allImageFileNames?: string; /** Path to a file listing all image names, one per line (for selective uploads; implies --selective) */ allImageFileNamesFile?: string; /** VCS commit SHA (defaults to the current commit) */ headSha?: string; /** VCS base commit SHA (defaults to the merge-base with the base ref) */ baseSha?: string; /** VCS provider (defaults to the current remote's provider) */ vcsProvider?: string; /** Head repository name, e.g. owner/repo (defaults to the current) */ headRepoName?: string; /** Base repository name, e.g. owner/repo (for forks) */ baseRepoName?: string; /** Head branch/reference (defaults to the current branch) */ headRef?: string; /** Base branch/reference (defaults to the merge-base tracking ref) */ baseRef?: string; /** Pull request number (auto-detected in pull_request GitHub Actions runs) */ prNumber?: string; /** Force collecting git metadata even outside CI (conflicts with --no-git-metadata) */ forceGitMetadata?: boolean; /** Disable automatic git metadata collection */ noGitMetadata?: boolean; }; export type SourcemapInjectParams = { /** Directory to scan for JS + sourcemap pairs */ directory?: string; /** Comma-separated file extensions to process (default: .js,.cjs,.mjs) */ ext?: string; /** Comma-separated glob patterns to exclude (gitignore-style) */ ignore?: string; /** Path to a file with gitignore-style patterns to exclude */ ignoreFile?: string; /** Show what would be modified without writing */ dryRun?: boolean; /** Exit successfully when no JS + sourcemap pairs are found (default: error out to catch silent build misconfigurations) */ allowEmpty?: boolean; }; export type SourcemapUploadParams = { /** Directory containing sourcemaps */ directory?: string; /** Release version to associate with the upload */ release?: string; /** Distribution identifier to disambiguate builds within a release */ dist?: string; /** URL prefix for uploaded files (default: ~/) */ urlPrefix?: string; /** Comma-separated file extensions to process (default: .js,.cjs,.mjs) */ ext?: string; /** Comma-separated glob patterns to exclude (gitignore-style) */ ignore?: string; /** Path to a file with gitignore-style patterns to exclude */ ignoreFile?: string; /** Strip a prefix from uploaded file paths (e.g. 'build/') */ stripPrefix?: string; /** Automatically strip the longest common path prefix from all files */ stripCommonPrefix?: boolean; /** Upload files as-is without injecting debug IDs */ noRewrite?: boolean; /** Exit successfully when no JS + sourcemap pairs are found (default: error out to catch silent build misconfigurations) */ allowEmpty?: boolean; }; export type SourcemapResolveParams = { /** Directory to scan for JS files */ directory?: string; /** Comma-separated file extensions to process (default: .js,.cjs,.mjs) */ ext?: string; /** Comma-separated glob patterns to exclude (gitignore-style) */ ignore?: string; /** Path to a file with gitignore-style patterns to exclude */ ignoreFile?: string; }; export type SpanListParams = { /** Number of spans (<=1000) */ limit?: number; /** Filter spans (e.g., "op:db", "project:backend", "project:[cli,api]") */ query?: string; /** Sort order: date, duration */ sort?: string; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type SpanViewParams = { /** Span tree depth limit (number, "all" for unlimited, "no" to disable) */ spans?: number; }; export type StatusShowParams = { /** Status page base URL to query */ url?: string; }; export type TraceListParams = { /** / or (search) */ orgProject?: string; /** Number of traces (1-1000) */ limit?: number; /** Search query (Sentry search syntax) */ query?: string; /** Sort by: date, duration */ sort?: string; /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Navigate pages: "next", "prev", "first" (or raw cursor string) */ cursor?: string; }; export type TraceViewParams = { /** Fetch full span attributes (auto-enabled with --json) */ full?: boolean; /** Span tree depth limit (number, "all" for unlimited, "no" to disable) */ spans?: number; }; export type TraceLogsParams = { /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */ period?: string; /** Number of log entries (<=1000) */ limit?: number; /** Filter query (e.g., "severity:error", "project:backend", "project:[a,b]") */ query?: string; /** Sort order: "newest" (default) or "oldest" */ sort?: string; }; export type TrialListParams = { /** Organization slug (auto-detected if omitted) */ org?: string; }; export type TrialStartParams = { /** Trial name (seer, replays, performance, spans, profiling, logs, monitors, uptime, plan) */ name?: string; /** Organization slug (auto-detected if omitted) */ org?: string; }; export type InitParams = { /** /, /, , or a directory path */ target?: string; /** Project directory (default: current directory) */ directory?: string; /** Accept non-interactive defaults (requires --features outside a TTY) */ yes?: boolean; /** Show what would happen without making changes */ dryRun?: boolean; /** Features to enable: errors,tracing,logs,replay,profiling,crons,agent-tracing,mcp-observability */ features?: Array; /** Team slug to create the project under */ team?: string; /** App to initialize in a monorepo (required with --yes when multiple apps are detected) */ app?: string; /** Use the Ink-based interactive UI (default). Pass --no-tui to fall back to plain log output. */ tui?: boolean; }; export type InfoParams = { /** Emit configuration + auth status as JSON (for external tooling); always exits 0 */ configStatusJson?: boolean; /** Verify only authentication, without requiring a default org/project */ noDefaults?: boolean; }; export type LocalServeParams = { /** Port to listen on (default 8969) */ port?: number; /** Hostname to bind to (default localhost) */ host?: string; /** Suppress per-envelope tail output */ quiet?: boolean; /** Only show items of this type (repeatable: error, transaction, log, ai) */ filter?: Array; /** Output format: human (default) or json (NDJSON on stdout) */ format?: string; /** Show a grouped attribute table (user vs SDK) under each transaction */ attributes?: boolean; /** Open Sentry Local UI in the browser */ open?: boolean; }; export type LocalRunParams = { /** Port for the local server (default 8969) */ port?: number; /** Hostname for the local server (default localhost) */ host?: string; /** Only show items of this type (repeatable: error, transaction, log, ai) */ filter?: Array; /** Verify SDK sends events, then exit */ verify?: boolean; /** Kill the child after N seconds (0 = no timeout; defaults to 30 s in --verify mode) */ timeout?: number; /** Output format: human (default) or json (NDJSON on stdout) */ format?: string; /** Include selected event attributes in output */ attributes?: boolean; /** Open Sentry Local UI in the browser */ open?: boolean; }; export type ApiParams = { /** API endpoint relative to /api/0/, or an absolute HTTP(S) URL */ endpoint?: string; /** The HTTP method for the request */ method?: string; /** Inline JSON body for the request (like curl -d) */ data?: string; /** Add a typed parameter (key=value, key[sub]=value, key[]=value) */ field?: Array; /** Add a string parameter without JSON parsing */ rawField?: Array; /** Add a HTTP request header in key:value format */ header?: Array; /** The file to use as body for the HTTP request (use "-" to read from standard input) */ input?: string; /** Do not print the response body */ silent?: boolean; /** Show the resolved request without sending it */ dryRun?: boolean; }; export type SchemaParams = { /** Show all endpoints in a flat list */ all?: boolean; /** Search endpoints by keyword */ search?: string; }; export type WasmSplitParams = { /** Path to the wasm file */ input?: string; /** Path to the output wasm file (default: modify input in place) */ out?: string; /** Path to the output debug wasm file (default: debug data stays in the input) */ debugOut?: string; /** Strip the file of debug info */ strip?: boolean; /** Strip the file of symbol names (only with --strip) */ stripNames?: boolean; /** Do not print the build id */ quiet?: boolean; /** Explicit build id to use, as a UUID */ buildId?: string; /** URL for browsers to fetch the separate DWARF debug symbol file */ externalDwarfUrl?: string; }; // --- SDK type --- export type SentrySDK = { /** Display help for a command */ help(...positional: string[]): Promise; /** Query aggregate event data (Explore) */ explore(params?: ExploreParams): Promise; /** Initialize Sentry in your project (experimental) */ init(params?: InitParams): Promise; /** Print configuration and verify authentication */ info(params?: InfoParams): Promise; /** Make an authenticated API request */ api(params?: ApiParams): Promise; /** Browse the Sentry API schema */ schema(params?: SchemaParams, ...positional: string[]): Promise; /** Add build ids to WebAssembly modules and split out debug data */ "wasm-split"(params?: WasmSplitParams): Promise; alert: { issues: { /** List issue alert rules */ list(params?: AlertIssuesListParams): Promise; /** View an issue alert rule */ view(params?: AlertIssuesViewParams): Promise; /** Create an issue alert rule */ create(params: AlertIssuesCreateParams): Promise; /** Delete an issue alert rule */ delete(params?: AlertIssuesDeleteParams): Promise; /** Edit an issue alert rule */ edit(params?: AlertIssuesEditParams): Promise; }; metrics: { /** List metric alert rules */ list(params?: AlertMetricsListParams): Promise; /** View a metric alert rule */ view(params?: AlertMetricsViewParams): Promise; /** Create a metric alert rule */ create(params: AlertMetricsCreateParams): Promise; /** Delete a metric alert rule */ delete(params?: AlertMetricsDeleteParams): Promise; /** Edit a metric alert rule */ edit(params?: AlertMetricsEditParams): Promise; }; }; auth: { /** Authenticate with Sentry */ login(params?: AuthLoginParams): Promise; /** Log out of Sentry */ logout(): Promise; /** Refresh your OAuth access token */ refresh(params?: AuthRefreshParams): Promise; /** View authentication status */ status(params?: AuthStatusParams): Promise; /** Print the stored authentication token */ token(): Promise; /** Show the currently authenticated identity */ whoami(): Promise; }; build: { /** Upload builds to a project */ upload(params?: BuildUploadParams, ...positional: string[]): Promise; /** Download a build artifact */ download(params?: BuildDownloadParams): Promise; }; cli: { /** Print the shell completion script */ completion(params?: CliCompletionParams): Promise; /** View and manage default settings */ defaults(params?: CliDefaultsParams, ...positional: string[]): Promise; /** Send feedback about the CLI */ feedback(...positional: string[]): Promise; /** Diagnose and repair CLI database issues */ fix(params?: CliFixParams): Promise; /** Import settings from legacy .sentryclirc files */ import(params?: CliImportParams): Promise; /** Configure shell integration */ setup(params?: CliSetupParams): Promise; /** Uninstall Sentry CLI */ uninstall(params?: CliUninstallParams): Promise; /** Update the Sentry CLI to the latest version */ upgrade(params?: CliUpgradeParams): Promise; }; "code-mappings": { /** Upload code mappings for stack trace linking */ upload(params?: CodeMappingsUploadParams): Promise; }; "agent-conversation": { /** List recent agent conversations */ list(params?: AgentConversationListParams): Promise; /** View an agent conversation transcript */ view(params?: AgentConversationViewParams): Promise; }; "dart-symbol-map": { /** Upload a Dart/Flutter symbol map to Sentry */ upload(params: DartSymbolMapUploadParams): Promise; }; "debug-files": { /** Inspect a debug information file */ check(params?: DebugFilesCheckParams): Promise; /** Locate debug files for given debug identifiers */ find(params?: DebugFilesFindParams, ...positional: string[]): Promise; /** Upload debug information files to Sentry */ upload(params?: DebugFilesUploadParams, ...positional: string[]): Promise; /** List the source files a debug file references */ "print-sources"(params?: DebugFilesPrintSourcesParams): Promise; /** Bundle a debug file's source files for source context */ "bundle-sources"(params?: DebugFilesBundleSourcesParams): Promise; /** Create a JVM source bundle for source context */ "bundle-jvm"(params: DebugFilesBundleJvmParams): Promise; }; dashboard: { /** List dashboards */ list(params?: DashboardListParams, ...positional: string[]): Promise; /** View a dashboard */ view: { (params: DashboardViewParams & { refresh: string }): AsyncIterable; (params?: DashboardViewParams, ...positional: string[]): Promise; }; /** Create a dashboard */ create(...positional: string[]): Promise; /** List dashboard revisions */ revisions(params?: DashboardRevisionsParams, ...positional: string[]): Promise; /** Restore a dashboard revision */ restore(params: DashboardRestoreParams, ...positional: string[]): Promise; widget: { /** Add a widget to a dashboard */ add(params: DashboardWidgetAddParams, ...positional: string[]): Promise; /** Edit a widget in a dashboard */ edit(params?: DashboardWidgetEditParams, ...positional: string[]): Promise; /** Delete a widget from a dashboard */ delete(params?: DashboardWidgetDeleteParams, ...positional: string[]): Promise; }; }; docs: { /** Find Sentry documentation pages by keyword */ list(params?: DocsListParams, ...positional: string[]): Promise; /** Ask a cited question about Sentry documentation */ query(...positional: string[]): Promise; }; dsn: { /** List DSNs */ list(params?: DsnListParams): Promise; }; org: { /** List organizations */ list(params?: OrgListParams): Promise; /** View details of an organization */ view(params?: OrgViewParams): Promise; }; platform: { /** List all valid Sentry platform identifiers */ list(params?: PlatformListParams): Promise; }; project: { /** Create one or more projects */ create(params?: ProjectCreateParams, ...positional: string[]): Promise; /** Delete a project */ delete(params?: ProjectDeleteParams): Promise; /** List projects */ list(params?: ProjectListParams): Promise; /** View details of a project */ view(params?: ProjectViewParams): Promise; }; proguard: { /** Upload ProGuard/R8 mapping files to Sentry */ upload(params?: ProguardUploadParams, ...positional: string[]): Promise; /** Compute the UUID for a ProGuard mapping file */ uuid(params?: ProguardUuidParams): Promise; }; "react-native": { /** Upload a React Native bundle + sourcemap (Gradle build step) */ gradle(params: ReactNativeGradleParams): Promise; /** Upload React Native sourcemaps (Xcode build step) */ xcode(params?: ReactNativeXcodeParams, ...positional: string[]): Promise; }; replay: { /** List recent Session Replays */ list(params?: ReplayListParams): Promise; /** View a Session Replay */ view(...positional: string[]): Promise; /** Download a Session Replay as rrweb JSON */ download(params?: ReplayDownloadParams, ...positional: string[]): Promise; }; release: { /** List releases with adoption and health metrics */ list(params?: ReleaseListParams): Promise; /** View release details with health metrics */ view(params?: ReleaseViewParams): Promise; /** Create a release */ create(params?: ReleaseCreateParams): Promise; /** Finalize a release */ finalize(params?: ReleaseFinalizeParams): Promise; /** Delete a release */ delete(params?: ReleaseDeleteParams): Promise; /** Archive a release */ archive(params?: ReleaseArchiveParams): Promise; /** Restore an archived release */ restore(params?: ReleaseRestoreParams): Promise; /** Create a deploy for a release */ deploy(params?: ReleaseDeployParams): Promise; /** List deploys for a release */ deploys(params?: ReleaseDeploysParams): Promise; /** Set commits for a release */ "set-commits"(params?: ReleaseSetCommitsParams): Promise; /** Propose a release version */ "propose-version"(): Promise; }; repo: { /** List repositories */ list(params?: RepoListParams): Promise; }; team: { /** List teams */ list(params?: TeamListParams): Promise; }; issue: { /** List issues in a project */ list(params?: IssueListParams): Promise; /** List events for a specific issue */ events(params?: IssueEventsParams): Promise; /** Analyze one or more issues using Seer AI */ explain(params?: IssueExplainParams, ...positional: string[]): Promise; /** Generate a solution plan using Seer AI */ plan(params?: IssuePlanParams): Promise; /** View details of one or more issues */ view(params?: IssueViewParams, ...positional: string[]): Promise; /** Mark an issue as resolved */ resolve(params?: IssueResolveParams): Promise; /** Reopen a resolved issue */ unresolve(params?: IssueUnresolveParams): Promise; /** Archive (ignore) an issue */ archive(params?: IssueArchiveParams): Promise; /** Merge 2+ issues into a single canonical group */ merge(params?: IssueMergeParams, ...positional: string[]): Promise; }; event: { /** View details of one or more events */ view(params?: EventViewParams, ...positional: string[]): Promise; /** List events for an issue */ list(params?: EventListParams): Promise; /** Send a Sentry event */ send(params?: EventSendParams, ...positional: string[]): Promise; }; feedback: { /** List and search User Feedback */ list(params?: FeedbackListParams): Promise; /** View a User Feedback item */ view(params?: FeedbackViewParams): Promise; /** Mark User Feedback as resolved */ resolve(params?: FeedbackResolveParams): Promise; /** Return User Feedback to the inbox */ unresolve(params?: FeedbackUnresolveParams): Promise; /** Mark User Feedback as spam */ spam(params?: FeedbackSpamParams): Promise; }; log: { /** List logs from a project */ list: { (params: LogListParams & { follow: string }): AsyncIterable; (params?: LogListParams, ...positional: string[]): Promise; }; /** View details of one or more log entries */ view(...positional: string[]): Promise; }; monitor: { /** Wrap a command with cron monitor check-ins */ run(params?: MonitorRunParams, ...positional: string[]): Promise; /** List cron monitors */ list(params?: MonitorListParams): Promise; }; snapshots: { /** Compare two directories of snapshot images */ diff(params?: SnapshotsDiffParams): Promise; /** Download baseline snapshot images */ download(params?: SnapshotsDownloadParams): Promise; /** Upload snapshots to a project */ upload(params: SnapshotsUploadParams): Promise; }; sourcemap: { /** Inject debug IDs into JavaScript files and sourcemaps */ inject(params?: SourcemapInjectParams): Promise; /** Upload sourcemaps to Sentry */ upload(params?: SourcemapUploadParams): Promise; /** Resolve and report sourcemap linkage for JavaScript files */ resolve(params?: SourcemapResolveParams): Promise; }; span: { /** List spans in a project or trace */ list(params?: SpanListParams, ...positional: string[]): Promise; /** View details of specific spans */ view(params?: SpanViewParams, ...positional: string[]): Promise; }; status: { /** Show Sentry service status */ show(params?: StatusShowParams): Promise; }; trace: { /** List recent traces in a project */ list(params?: TraceListParams): Promise; /** View details of a specific trace */ view(params?: TraceViewParams, ...positional: string[]): Promise; /** View logs associated with a trace */ logs(params?: TraceLogsParams, ...positional: string[]): Promise; }; trial: { /** List product trials */ list(params?: TrialListParams): Promise; /** Start a product trial */ start(params?: TrialStartParams): Promise; }; local: { /** Start the local dev server and tail events */ serve(params?: LocalServeParams): Promise; /** Run a command with the local dev server enabled */ run(params?: LocalRunParams, ...positional: string[]): Promise; }; };