Dashboard › cli › Distillation
9745f733-967e-46d6-ad92-095c056ec737["lore_tm_v1_-4TMbEl8obE-OUseYSak9sxx34z-4KRrDMMFYAIuJDg","lore_tm_v1_mP-ky42FKi0l8WY-YDnPZu6DeHP5VLbf3a7V8grj4Vk","lore_tm_v1_NZObw7iy3JJ8lvuA_n9ZJ-7djjnMwbFExywI14sEtdE","lore_tm_v1_BkXPdT5QxLAoLWSWkb4U8Gn9j_B-plxjxPt6GMqbbmM","lore_tm_v1_S2s9vvHJZFcz7brsemDKj1SrPgIq6UmvKo_N10T1JnU","lore_tm_v1_XhRYGQYnOsAaTVQNrjtf3yZE1vYl5Mv7YYM0vxBK7GU","lore_tm_v1_qzvc6de00y1cBPLL1aSlH0nGNRWkG_CHecL99DDM0hU","lore_tm_v1_mV_4MOtANcSmsVCH2aGsRL8Al90VenxGRDsfv0wg5tc","lore_tm_v1_7Y_gWC6Ip3Q_wwKxSfntciDBhdgL1mMX2OyqWBuNMyg"]
packages/cli/script/generate-skill.ts, loadPrerequisites() reads ${DOCS_PATH}/getting-started.mdx; if absent it returns getDefaultPrerequisites(), otherwise it strips frontmatter/MDX components, emits ## Prerequisites, states the CLI must be installed and authenticated, and extracts the Install Script and Authentication sections.generateInstallSection() combines extracted bash blocks with an npm command when available; when both exist it inserts # Or install via npm/pnpm/bun.generateAuthSection() emits ### Authentication and combines extracted bash blocks into one fenced bash block.getDefaultPrerequisites() documents: install via curl https://cli.sentry.dev/install -fsS | bash; alternatively npm install -g sentry; OAuth login with sentry auth (recommended); API-token login with sentry auth --token YOUR_SENTRY_API_TOKEN; and status checking with sentry auth status.appendExample(map, key, code) appends code to the existing Map<string, string[]> entry or creates a new array.collectCommandPaths(tokens, examples) collects paths from depth-3 headings recognized by extractCommandPathFromHeading(), initializes missing example-map entries to [], and returns the paths in token order.packages/cli/script/check-fragments.ts validates 5 conditions: 1. every visible route has a command fragment plus index.md; 2. every command fragment maps to an existing route or index.md; 3. fragments contain neither YAML frontmatter nor <!-- GENERATED:END -->; 4. required top-level fragments exist; 5. multi-command route fragments cover every otherwise example-less subcommand.check-fragments.ts supports tsx script/check-fragments.ts for warnings and tsx script/check-fragments.ts --strict to treat missing-subcommand coverage as errors.check-fragments.ts creates src/generated/skill-content.ts with exact content export const SKILL_FILES: [string, string][] = [];\n before dynamically importing ../src/app.js.check-fragments.ts uses FRAGMENTS_DIR = \${DOCS_FRAGMENTS}/commands`, GENERATED_END_MARKER = "<!-- GENERATED:END -->", SKIP_ROUTES = new Set(["help"]), and requires the top-level fragment configuration.md`.process.exit(1).fragmentMentionsSubcommand() accepts coverage through: 1. the full sentry <route> <subcommand> reference anywhere; 2. bare sentry <route> for a default command, guarded by a regex boundary; or 3. a level 1β4 Markdown heading containing the leaf subcommand outside fenced code blocks.stripCodeBlocks() uses FENCED_CODE_BLOCK_RE = /^({3,}|~{3,}).\n[\s\S]?\n\1\s*$/gm` to avoid interpreting bash comments inside fenced blocks as Markdown headings.getMultiCommandRoutes() skips standalone routes only when they have at most 1 command and that commandβs path is exactly sentry ${route.name}.findDefaultInRouteMap() identifies a default subcommand by object-reference comparison between target.getDefaultCommand() and entries from target.getAllEntries(); getDefaultCommandName(routeName) locates the route and returns that name.cmd.examples.length > 0 are excluded from fragment-coverage checks; uncovered subcommands produce warnings normally or errors under --strict, with a hint such as sentry ${routeName} ${missing[0]}.check-fragments.ts output reports the exact number of command fragment files as ${routeNames.size} routes + index and the exact number of required top-level fragments.buildListCommand, buildOrgListCommand, or buildDeleteCommand matches across list/delete implementations and shared builders, including trace, team, span, repo, replay, release, project, monitor, alert metrics, log, alert issues, agent-conversation, cli uninstall, issue, dashboard widget, dashboard, feedback, explore, and event.packages/cli/src/commands/agent-conversation/list.ts defines COMMAND_NAME = "agent-conversation list", PAGINATION_KEY = "agent-conversation-list", DEFAULT_PERIOD = "7d", and an optional org positional.agent-conversation list uses buildListCommand("agent-conversation", ...); its flags include limit, optional query, period, plus builder-provided json, cursor, fresh, and fields; aliases include n: "limit", q: "query", and PERIOD_ALIASES.agent-conversation list documents 5 ordered examples: 1. 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"; 5. sentry agent-conversation list my-org -c next.agent-conversation list resolves the organization with resolveOrg({ org: target, cwd }), throws ContextError("Organization", USAGE_HINT) if unresolved, and calls listConversations(org, { query, limit, cursor, ...timeParams }) through withProgress() with message Fetching conversations (up to ${flags.limit})....q and serializeTimeRange(flags.period); it uses resolveCursor(), advancePaginationState(), and hasPreviousPage().agent-conversation list JSON output is { data, hasMore, hasPrev, nextCursor? }; --fields filters each conversation item through filterFields().No conversations on this page. when the current page is empty but more results exist, No agent conversations found. when empty with no more results, or Agent conversations in ${org}: followed by formatConversationTable(conversations).agent-conversation list use sentry agent-conversation list ${org} -c next${flagSuffix} and ... -c prev${flagSuffix}, preserving -q "${flags.query}" and non-default period hints.packages/cli/src/commands/agent-conversation/view.ts, conversation IDs are organization-scoped and never contain /; they are not org/project-scoped like trace/replay IDs.agent-conversation view uses target syntax [<org>/]<conversation-id>; parseConversationTarget() treats a slashless value as the conversation ID with auto-detected organization, or splits once at the first / into organization and conversation ID, rejecting an empty segment with ContextError("Conversation ID", USAGE_HINT, []).agent-conversation view documents 3 ordered examples: 1. sentry agent-conversation view conv-123; 2. sentry agent-conversation view my-org/conv-123; 3. sentry agent-conversation view my-org/conv-123 --json.agent-conversation view defines fresh: FRESH_FLAG with FRESH_ALIASES, calls applyFreshFlag(flags), resolves the org via resolveOrg({ org: orgArg, cwd }), and fetches through getConversationSpans(org, conversationId) with progress message Fetching conversation spans....agent-conversation view builds output with buildTranscriptResult(conversationId, org, spans, title), assigns result.truncated = truncated, and yields CommandOutput<TranscriptResult>.ListCommandOptions in packages/cli/src/lib/list-command.ts provides noCursorFlag?: boolean and noFreshAlias?: boolean; there is no option to suppress the --fresh flag itself.buildListCommand() intercepts plural-alias subcommand confusion, auto-injects common flags/aliases, and auto-calls applyFreshFlag(flags) before the original command function.--fresh in buildListCommand() unless the command already defines it.buildListCommand() injects --cursor unless options.noCursorFlag is true or the command defines cursor; it injects -f β fresh unless options.noFreshAlias is true or alias f exists, and -c β cursor unless cursor injection is disabled or alias c exists.buildListCommand()βs wrapped function, the first positional argument is always the target (the org/project pattern); when it is a string or undefined, it is passed through interceptSubcommand(args[0], ctx.stderr, routeName) before calling the original function.buildOrgListCommand() delegates to buildListCommand(), uses optional positional LIST_TARGET_POSITIONAL, limit: buildListLimitFlag(config.entityPlural), and LIST_BASE_ALIASES, then parses the target with parseOrgProjectArg() and calls dispatchOrgScopedList() with orgSlugMatchBehavior: "redirect".buildOrgListCommand() human rendering uses config.displayTable(result.items), appends result.header when present, and renders result.hint directly for empty results; its command footer only receives the hint when items exist.buildDeleteCommand() in packages/cli/src/lib/mutate-command.ts auto-injects --yes, --force, and --dry-run plus aliases -y, -f, and -n, subject to existing definitions and supported opt-outs.--yes in buildDeleteCommand() unless the command already defines it.buildDeleteCommand() injects --force unless options.noForceFlag is true or force already exists, and injects --dry-run unless options.noDryRunFlag is true or dry-run already exists.buildDeleteCommand() injects -y β yes unless alias y already exists, -f β force unless force is opted out or alias f exists, and -n β dry-run unless dry-run is opted out or alias n exists.buildDeleteCommand() retain responsibility for their own data-dependent confirmation prompts using confirmByTyping() and isConfirmationBypassed().buildDeleteCommand() runs guardNonInteractive() before the original function unless options.noNonInteractiveGuard is true; the guard receives yes, force, and dry-run flags.--yes nor --force was passed; --dry-run bypasses the guard because it makes no changes.