Use shell completers to suggest valid values to agents

Aberta
#1,895 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
43/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
typescript

Direção de pesquisa

Start with lib/complete.ts and read the linked cli-first-mcp design and tasks, especially tasks 5.1 and 5.2; inspect the per-command tool validation and existing shell completion tests. Trace how completions use the SQLite cache and live API before adding ranked candidates to validation errors and static choices to generated schemas. Done when the shell completion tests pass unchanged and the specified validation tests cover slugs, issue IDs, dataset fields and aggregates, and query keys and values.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

CLI enhancement MCP

Part of #1357. Plan: cli-first-mcp tasks 5.1 and 5.2 (design, tasks). Depends on #1890.

Why

Agents get slugs, IDs, fields, and query keys wrong. The shell completion system already knows valid values. With no search_sentry tool to host a complete mode, completions reach agents through the per-command tools themselves.

Scope

  • Split the completers in lib/complete.ts into completers over a data source: the SQLite cache with a live API fallback on stdio, the live API uncached on hosted.
  • When a per-command tool gets an invalid or unknown value (org/project slug, issue ID, dataset field or aggregate, query key or value), return the error with ranked candidates and their descriptions so the agent can retry.
  • Put static choices (enum-like flag values) into the tool schema as examples at catalog generation time.

Done when

  • Shell completion tests pass unchanged.
  • Tests for slugs, issue IDs, dataset fields and aggregates, and query keys and values in validation errors.

via @BYK.

--

View Session in Sentry

Linguagem predominante
TypeScript
Estrelas
961
Forks
179
Merge médio
15h 33min
PRs com merge (30d)
476

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de getsentry/toolkit

Todas as issues de getsentry/toolkit

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.