Dashboard › cli › Distillation
60b6b2aa-0ac4-4b6d-b170-4c8870221d37["lore_tm_v1_0Bm6DodTmtsBWp2_GgR2qG5DpbV038nGCnIk85FNPD8","lore_tm_v1_qP9PfSEEFIVoiqR99IvlSZ74O-swhI3RtSwTmIAAHyw","lore_tm_v1_tx2uRYSg-h6P8aGS073zSVYqFzlr_Rbv4h51z9eLQkU","lore_tm_v1_1zthpEcktVn1KzpCKlaYIuuKmYjB8NWUo4AoXZYZ4gw","lore_tm_v1_U1n870jG0Eh_V2a_XWhVrncl9kV2TGPoPWajLulMLO0","lore_tm_v1_DV9DxgJfDTT8gk2Aj5A6Nc110ce3-bpqxMQauj3q05Y","lore_tm_v1_yOPvsZGCUseaYKwnL1kwPBQNW1q4eNrjKFBNjT4QrGk","lore_tm_v1_yXC-7B7HzGxbHLN0ERiuHVumqwv7O0wi8KPHkKRmZKw","lore_tm_v1_N1I2hOibtGpmD94A_bpUcEB_ukgCVYMz5dOb2CKYE68","lore_tm_v1_o51oLofnoCyjjm5GewXW05pGQOzuX_n3KOGyElM8zpM","lore_tm_v1_IVkksuY-iSo1iVBF7rB-2M3IIu45sJMfM7sk_NhfNmU"]
packages/cli/test/commands/agent-conversation/view.test.ts has 415 lines; its final tests require human output to contain "truncated" when getConversationSpans() returns truncated: true, and "No spans found" when it returns spans: [], truncated: false, and title: null.packages/cli/src/lib/input-validation.ts defines characters matching /[?#%\s]/ as never valid in Sentry resource identifiers such as slugs and IDs: ? enables query-string injection, # fragment injection, % introduces pre-URL-encoded/double-encoding risk, and whitespace breaks URL structure.PRE_ENCODED_PATTERN is /%[0-9a-fA-F]{2}/, CONTROL_CHAR_PATTERN is /[\x00-\x1f]/, and PATH_TRAVERSAL_PATTERN is /(^|\/)\.\.(\/|$)/.describeForbiddenChar() maps ? to "?" (query string), # to "#" (URL fragment), % to "%" (URL encoding), space to "a space", tab to "a tab character", newline to "a newline", carriage return to "a carriage return", and null to "a null byte"; other controls are formatted as control character (0xNN) and other whitespace as whitespace character (U+NNNN).rejectControlChars(input, label) finds the first ASCII control character below 0x20 and throws ValidationError identifying the character and stating that the capitalized label must not contain control characters.rejectPreEncoded(input, label) rejects %XX sequences with a ValidationError that recommends plain text instead of percent encoding, using "my project" versus "my%20project" as its example.validateResourceId(input, label) first calls rejectControlChars(), then rejects ?, #, %, or whitespace and states that slugs and IDs may contain only letters, numbers, hyphens, and underscores; documented malformed examples are my-org?query=foo, my-project#anchor, CLI-G%20extra, and my-org\tother.validateEndpoint(endpoint) rejects control characters and .. path segments at slash boundaries; its error recommends absolute API paths such as /api/0/organizations/my-org/issues/, and documented rejected examples are sentry api "../../admin/settings/" and sentry api "organizations/../admin".validateResourceId() call sites include packages/cli/src/lib/arg-parsing.ts for project slugs, organization slugs, issue identifiers, generic IDs via idLabel, and issue prefixes, plus packages/cli/src/commands/init.ts for parsed organization slugs and project names.@stricli/core version path is node_modules/.pnpm/@stricli+core@1.2.8_patch_hash=892258f886d48063b409e0ac6141260023c396d1ed4f915231701f6a34edffcc/node_modules/@stricli/core/dist/index.d.ts; its CustomUsage has readonly input and brief strings, while CommandDocumentation natively declares brief, optional fullDescription, and optional customUsage, but not examples.packages/cli/src/app.ts function formatSynonymError() only handles CliError, uses getSynonymSuggestionFromArgv(), formats Error: and Tip: with ANSI-aware colors, and returns undefined if no synonym applies.escapesToOuterMiddleware() returns true for OutputError, AuthError reasons "not_authenticated" or "expired", and ApiError statuses 401 or 403.customText.exceptionWhileParsingArguments handles three argument-error paths: bare route groups via detectBareRouteGroup() on UnsatisfiedPositionalError; plural aliases via detectPluralAliasMisuse() on UnexpectedPositionalError; and known synonyms consumed as positional arguments by defaultCommand: "view" via getSynonymSuggestionFromArgv().customText.noCommandRegisteredForInput preserves Stricliβs base error, derives route context from the first non-flag argument, and appends an ANSI-safe warning tip from getCommandSuggestion(); the documented example is sentry cli info suggesting sentry auth status.customText.exceptionWhileRunningCommand rethrows errors selected by escapesToOuterMiddleware(), formats known synonym mistakes without Sentry capture, otherwise calls reportCliError(), suppresses duplicate output for a rendered WizardError, cleanly formats other CliError instances, prints stacks for unexpected Error instances, and uses stringifyUnknown() for non-Error values.packages/cli/src/app.ts treats 400 Bad Request as a CLI bug; reportCliError() enforces silencing for OutputError, expected AuthError, and 401β499 ApiError instances, plus fingerprint normalization.app configuration uses scanner case style "allow-kebab-for-camel", enables allowArgumentEscapeSequence so -- stops flag parsing for wrapper commands, derives topLevelFlags through buildTopLevelFlags(), uses getExitCode, delegates structured --help --json rendering to renderJsonHelp(prefix, unprocessedInputs), and loads customText.packages/cli/src/lib/list-command.ts defines ListCommandOptions.noCursorFlag to suppress --cursor and -c, and noFreshAlias to suppress only the -f alias where commands such as log list reserve -f for --follow.buildListCommand() must always inject --fresh unless the command already defines it.buildListCommand() injects --cursor unless noCursorFlag is set or cursor already exists; injects -f unless noFreshAlias is set or alias key f already exists; injects -c unless cursor is opted out or alias key c already exists; and preserves commandsβ custom fresh or cursor flag definitions.buildListCommand() always calls applyFreshFlag(flags) before invoking the command function.buildListCommand() intercepts that first positional target with interceptSubcommand(args[0], ctx.stderr, routeName) when it is a string or undefined, to handle plural-alias confusion.formatListHuman() returns only the hint for an empty result, otherwise renders config.displayTable(result.items) and appends \n${result.header} when a header exists.buildOrgListCommand() creates an optional positional target, supplies --limit/-n, --json, --fields, --cursor/-c, and --fresh through shared builders, parses the target with parseOrgProjectArg(), dispatches through dispatchOrgScopedList() using orgSlugMatchBehavior: "redirect", yields new CommandOutput(result), and returns a footer hint only when results contain items.packages/cli/src/lib/mutate-command.ts defines buildDeleteCommand() to auto-inject --yes, --force, and --dry-run unless already defined or opted out, and to add aliases -y, -f, and -n when their alias keys are available.DeleteCommandOptions includes noDryRunFlag to suppress --dry-run and -n, and noNonInteractiveGuard to skip the pre-hook; the shown implementation also uses noForceFlag to suppress --force and -f.buildDeleteCommand() runs guardNonInteractive() before the original function unless noNonInteractiveGuard is set; the guard refuses destructive execution when stdin is not a TTY and neither --yes nor --force was passed, while --dry-run bypasses the guard because it makes no changes.confirmByTyping() and isConfirmationBypassed().packages/cli/test/lib/command.test.ts uses Vitest and Stricliβs run() for end-to-end command-wrapper tests; createTestContext() separately collects stdout in output and stderr in errors.init -y and init -n disable prompts; init --yes=false allows prompts; data-command aliases -n 10 for limit and -y 2 for row also allow prompts.buildCommand tests require valid construction with ordinary or empty parameters, retention of primary customUsage as __primaryUsage, retention of structured documentation examples as __examples, and re-export of Stricliβs numberParser.customUsage: ["<name>:<kind>..."] and expects command.__primaryUsage === "<name>:<kind>..."."Select an organization explicitly" and command "sentry thing list my-org", and expects that exact object in command.__examples.run(app, ["test", "--verbose", "--limit", "50"], ctx) for a command whose verbose default is false and whose parsed limit default is "10".