Dashboard › cli › Distillation
01ed01d7-1a08-4460-8ad0-c1d7082b6ae5["lore_tm_v1_ndY8t-PuOxgUOuigHxcsoPyQdX7N6D0AMTX7IgeTX2k","lore_tm_v1_GkiRiLrWkdDAHigyP8rstg5qT4aLXEmBa65fQmzGB98","lore_tm_v1_nZUzM6duLoMFWwZZv8b1eBhWC_BtrOzJTPLSN0z1iM4","lore_tm_v1_mnOhQkg2NNlM-1LqlrO-nOyja_frWPKNMGlcXFoRh44"]
paginate<T>() in packages/cli/src/lib/api/infrastructure.ts accepts options: { limit?: number; cursor?: string }, a fetchPage(perPage, cursor) callback, and defaultLimit = 10; it computes limit = options.limit ?? defaultLimit, caps perPage with Math.min(limit, API_MAX_PER_PAGE), and calls autoPaginate() with the initial options.cursor.autoPaginate() trims overshot results to allRows.slice(0, limit) and omits nextCursor because retaining it would skip items; upon reaching MAX_PAGINATION_PAGES, it warns with the exact page/item counts and returns the limit-bounded rows without a cursor.apiRequestToRegion<T>() in packages/cli/src/lib/api/infrastructure.ts normalizes a leading slash from endpoint, builds ${config.baseUrl}/api/0/${normalizedEndpoint}${queryString}, defaults to GET, and sends "Content-Type": "application/json".apiRequestToRegion<T>() serializes defined request bodies with JSON.stringify(); when bodyEncoding === "zstd" and zstdCompressAsync is available, it compresses Buffer.from(json) and sets "Content-Encoding": "zstd", otherwise it sends the JSON string.apiRequestToRegion<T>() delegates non-OK responses to throwRawApiError(response, endpoint). For HTTP 204 or 205, it throws ApiError with message API returned ${response.status} ${response.statusText} (no body) and guidance that no records may have matched; this avoids a downstream response.json() SyntaxError.apiRequestToRegion<T>() is debug-logged as "Failed to parse JSON response body" and converted into ApiError with message Invalid JSON in API response from ${endpoint} and guidance identifying a possible proxy or CDN issue.?, #, %, and whitespace are never valid in Sentry resource identifiers such as slugs and IDs.packages/cli/src/lib/input-validation.ts defines RESOURCE_ID_FORBIDDEN = /[?#%\s]/, PRE_ENCODED_PATTERN = /%[0-9a-fA-F]{2}/, CONTROL_CHAR_PATTERN = /[\x00-\x1f]/, and segment-bounded PATH_TRAVERSAL_PATTERN = /(^|\/)\.\.(\/|$)/.describeForbiddenChar() produces specific descriptions for ? ("?" (query string)), # ("#" (URL fragment)), % ("%" (URL encoding)), space, tab, newline, carriage return, null byte, generic ASCII control characters formatted as 0xXX, and other whitespace formatted as U+XXXX.rejectControlChars(input, label) throws ValidationError for ASCII control characters below 0x20, capitalizes the label for its explanatory second line, and states that the labeled value must not contain control characters.rejectPreEncoded(input, label) rejects %XX sequences with ValidationError, reports the first matched sequence, and advises plain text—for example, "my project" rather than "my%20project".validateResourceId(input, label) first calls rejectControlChars(), then rejects the first character matching RESOURCE_ID_FORBIDDEN; its guidance says slugs and IDs must contain only letters, numbers, hyphens, and underscores. Documented rejected examples are my-org?query=foo, my-project#anchor, CLI-G%20extra, and my-org\tother.validateEndpoint(endpoint) first calls rejectControlChars(endpoint, "API endpoint"), then rejects .. path segments matching PATH_TRAVERSAL_PATTERN; documented rejected examples are sentry api "../../admin/settings/" and sentry api "organizations/../admin", with guidance to use an absolute API path such as /api/0/organizations/my-org/issues/..github/workflows/pr-risk.yml changed getsentry/pr-risk-action@v0 input apply-label from the unconditional string "true" to ${{ github.event.pull_request.head.repo.full_name == github.repository }}, so labels are applied only when the pull request head repository is the current repository.apps/cli-docs/src/fragments/commands/agent-conversation.md was emptied, removing its hand-written list/view examples, including the incorrect two-positional-argument forms sentry agent-conversation view my-org conv-123 and sentry agent-conversation view my-org conv-123 --json.packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md now documents sentry agent-conversation view [<org>/]<conversation-id> and includes both organization auto-detection and the explicit slash-separated example sentry agent-conversation view my-org/conv-123.sentry project view [<org/project>], sentry alert issues list [<org/project>], sentry alert issues create [<target>], sentry alert metrics list [<target>], sentry cli completion [<shell>], sentry explore [<target>], sentry issue list [<org/project>], sentry monitor list [<org/project>], sentry replay list [<org/project>], sentry repo list [<org/project>], sentry trial list [<org>], and sentry init [<target>] [<directory>].