Use shell completers to suggest valid values to agents

Aperta
#1,895 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
43/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
961
Fork
179
Merge medio
15h 33m
PR unite (30g)
476

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/toolkit

Tutte le issue di getsentry/toolkit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.