Dashboard › cli › Distillation
0440d535-38d7-4843-a406-52b245b4a33f["lore_tm_v1_P4KYspJlT9yEsqkPocJTAhOyVY_RBuWt4ADMDWkwERA","lore_tm_v1_KrGAdWiHB19PUJ4wAjiCl-lQ7fTMEJKVSaa8PCHkMxI","lore_tm_v1_CyhGDZeMrKSDPxPqYkLz0P6Ity9gMOpbG-UvkZhs_HI","lore_tm_v1_ziTmMo5_4jBsHCYvtdNSC5KjTwxWw8ApzH7PiiJXb-w","lore_tm_v1_2_rLKpzuKM_W1waYJrc2jdHkvM_Yw97WulBTSGJF5Xg","lore_tm_v1_BuVMwJseEJvODNtzvYWDA2OjUeUON_v8V3Bm9t-lmhw","lore_tm_v1_BYoeZ6v1kTvqPchehEkRR5WYE6q83zCJ6cLBLC_-N_4","lore_tm_v1_LSzkhROmtK89tNogn8rXRNlEbAcZBeNXVtIDPhY6PD8","lore_tm_v1_sbY3fpSCRF5PcembhUrGWoI8VIH5KoeENB2XKisB15g","lore_tm_v1_511l769psf-b34MeTAxv6vTFB6VWFSQef3oANWpiNCE","lore_tm_v1_aH6f4aZBQJSzhoZDRGzgrkq_YIW4Nbevqy_gzdrzhIE"]
field when constructing the error; unfielded ValidationErrors collapse into one Sentry fingerprint.groupRoutesByReference(routeInfos) in packages/cli/script/generate-skill.ts creates a 1:1 Map<string, RouteInfo[]> from each visible non-help route name to [route], eliminating manual route-to-reference mappings that can become stale.generateAllSkillFiles(routeMap) obtains package version, route metadata, prerequisites, supplementary sections, and agent guidance; generates references/${refName}.md for each route group; and records route-to-reference filenames for the compact command index.SKILL.md frontmatter contains name: sentry-cli, package version, SKILL_DESCRIPTION, requires.bins: ["sentry"], and requires.auth: true; its title is # Sentry CLI Usage Guide and its introduction says Help users interact with Sentry from the command line using the \sentry` CLI.`.SKILL.md core-agent rule is: βjust run the commandβ; the CLI auto-detects org/project from .sentryclirc, DSNs in .env/source, and the directory name, so agents must not manually list organizations and projects unless auto-detection fails or selects the wrong target.## Agent Guidance and shifts existing Markdown headings at levels 2β6 down one level using /^(#{2,6})\s/gm; generated prerequisites, compact commands, and supplementary sections follow.generateIndexJson(generatedFiles) sorts SKILL.md first and all remaining paths with localeCompare, then emits newline-terminated pretty JSON containing one skill with name: "sentry-cli", description: SKILL_DESCRIPTION, and the sorted files list.REFERENCES_DIR recursively with force to remove stale files, creates each generated fileβs parent directory, writes all files under SKILL_DIR, and writes the discovery manifest after creating the parent directory for INDEX_JSON_PATH.files.entries() lexicographically by path and escapes backslashes, backticks, and ${ before placing contents in template literals in src/generated/skill-content.ts; the generated export is export const SKILL_FILES: ReadonlyMap<string, string> = new Map([...]);.src/generated/skill-content.ts header says the file is auto-generated by script/generate-skill.ts and must not be edited manually; completion reports Generated ${OUTPUT_PATH} + ${refCount} reference files + ${INDEX_JSON_PATH} + ${SKILL_CONTENT_PATH}.references/agent-conversation.md uses version 0.45.0-dev.0, description List and view agent conversations, requires the sentry binary and authentication, and documents sentry agent-conversation list [<org>] plus sentry agent-conversation view [<org>/]<conversation-id>.-n, --limit <value> with range 1-1000 and default "25"; -q, --query <value>; -t, --period <value> with examples "7d", "2026-08-01..2026-09-01", and ">=2026-08-01" plus default "7d"; -f, --fresh; and -c, --cursor <value> accepting "next", "prev", "first", or a raw cursor.conversationId (string), 2. title (string | null), 3. flow (array), 4. errors (number), 5. llmCalls (number), 6. toolCalls (number), 7. totalTokens (number), 8. totalCost (number), 9. startTimestamp (number), 10. endTimestamp (number), 11. traceCount (number), 12. traceIds (array), 13. firstInput (string | null), 14. lastOutput (string | null), 15. user (object | null), 16. toolNames (array), and 17. toolErrors (number).sentry agent-conversation list, 2. sentry agent-conversation list my-org, 3. sentry agent-conversation list --limit 50 --period 24h, 4. sentry agent-conversation list -q "has:errors", and 5. sentry agent-conversation list my-org -c next.-f, --fresh flag and examples, in order: 1. sentry agent-conversation view conv-123, 2. sentry agent-conversation view my-org/conv-123, and 3. sentry agent-conversation view my-org/conv-123 --json.buildResolutionMessage(resource, headline, hint, suggestions) formats ${resource} ${headline}., a Try: section containing the primary hint, and an optional Or: bullet list for suggestions.ContextError is for omitted required context, while ResolutionError is for a user-supplied value that could not be matched and ValidationError is for malformed input; omitted alternatives means auto-detection was attempted and uses DEFAULT_CONTEXT_ALTERNATIVES, whereas explicitly passing [] produces required-context wording without defaults.ContextError uses EXIT.CONTEXT_MISSING, stores resource, command, resolved alternatives, and optional note, and throws a developer-time Error if command contains a newline because multi-line resolution failures should use ResolutionError.ResolutionError stores resource, headline, hint, and suggestions, uses EXIT.RESOLUTION, defaults suggestions to [], and returns its already-formatted message from format().buildValidationMessage(headline, examples, note?) emits the headline, an optional Try: section with each example indented by two spaces, and an optional single-line Note: ${note} section.validationError(headline, examples, field?, note?) wraps buildValidationMessage() and constructs ValidationError; ValidationError stores optional field and uses EXIT.VALIDATION.deriveErrorKind() in packages/cli/src/lib/error-reporting.ts groups ValidationError by error.field and otherwise falls back to extractMessagePrefix(error.message); the fallback exists because grouping solely on a missing field would collapse all unfielded validation errors together.extractMessagePrefix(message, maxWords = 3) uses only the first line, removes single- and double-quoted user data, normalizes whitespace, and returns the first maxWords; bare CliError grouping uses extractMessagePrefix(error.message, 4).deriveErrorKind() mappings are: ContextError β resource; ResolutionError β normalized resource plus normalized headline; ValidationError β field or message prefix; ApiError β stringified HTTP status; SeerError, AuthError, and UpgradeError β reason; DeviceFlowError β code; TimeoutError β "timeout"; HostScopeError β "host_scope"; WizardError β "wizard"; and bare CliError β four-word message prefix.packages/cli/src/lib/api/conversations.ts calls private /organizations/{org}/agents/conversations/ endpoints through apiRequestToRegion with local Valibot schemas because they are not yet in @sentry/api; it follows the logs.ts/traces.ts pattern and uses parseLinkHeader for pagination.fetchConversationsPage() always sends per_page, conditionally sends statsPeriod, start, end, cursor, query, and project, validates the response with array(ConversationListItemSchema), and returns { data, nextCursor }.listConversations(orgSlug, options = {}) resolves the organization region and delegates pagination to paginate(options, ...); supported options are query, limit, cursor, statsPeriod, start, end, and project, with multi-page fetching bounded by MAX_PAGINATION_PAGES.getConversationSpans(orgSlug, conversationId, options = {}) defaults per_page to 1000 and statsPeriod to "30d", optionally filters by project, URL-encodes conversationId, validates against AgentConversationDetailsSchema, captures title only from page 0, and accumulates all data.spans.MAX_PAGINATION_PAGES, follows nextCursor, sets truncated = !!cursor after the loop, and logs Pagination limit reached (${MAX_PAGINATION_PAGES} pages, ${spans.length} spans). Conversation transcript may be incomplete. when truncated; it returns { spans, truncated, title }.resolveOrgProjectOrGuide(options) is a drop-in replacement for the resolveOrgAndProject(...) plus null-check pattern, returning resolveOrgAndProject(options) or guideOrgProjectFailure(options) and throwing ContextError when no target can be resolved or selected.resolveOrg(options) resolution priority is exactly: 1. positional/CLI org, 2. SENTRY_ORG / SENTRY_PROJECT environment variables, 3. .sentryclirc, 4. config defaults, and 5. DSN auto-detection.normalizeNumericOrg() before using it in APIs that reject numeric IDs, calls setOrgProjectContext([resolvedOrg], []), and silently returns null if DSN auto-detection throws.resolveProjectBySlug(projectSlug, usageHint, disambiguationExample?, originalSlug?) treats any supplied originalSlug as display-name input, skips slug API lookups in that case, lists organizations, and proceeds directly to display-name fuzzy matching through triageProjectNotFound().ResolutionError("'${projectSlug}'", "is an organization, not a project", ...), suggesting sentry project list ${projectSlug}/ and ${projectSlug}/<project>; a fuzzy match is verified with getProject(outcome.org, outcome.project) before returning telemetry context.