Use shell completers to suggest valid values to agents

Abierto
#1,895 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
43/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
961
Forks
179
Merge medio
15 h 33 min
PR fusionados (30 d)
476

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/toolkit

Todos los issues de getsentry/toolkit

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.