fix(cli): explain treats bare eve commands as file paths

Aperta Adatta ai principianti
#388 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bun, typescript

Direzione di ricerca

Inizia in src/cli/explain.ts, intorno alle righe 87–98, dove la CLI classifica i target, e consulta la guida di explain in src/cli/index.ts. Riproduci il problema con i quattro comandi del report, poi controlla l’output pubblico della CLI. Il lavoro è completato quando eve info viene classificato come Bash e corrisponde alla skill eve, mentre eve info --help, npx eve info e middleware.ts mantengono il comportamento segnalato.

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

Descrizione

Summary

The explain CLI reports no matching skill for eve info because it classifies that command as a file path. The same skill map matches this input when evaluated as Bash. This gives a false negative when diagnosing eve command routing; it does not demonstrate a failure in the active agent hooks.

Steps to reproduce

From a checkout of the plugin baseline below, with Bun available, run:

VERCEL_PLUGIN_TELEMETRY=off bun run src/cli/index.ts explain "eve info" --json
VERCEL_PLUGIN_TELEMETRY=off bun run src/cli/index.ts explain "eve info --help" --json
VERCEL_PLUGIN_TELEMETRY=off bun run src/cli/index.ts explain "npx eve info" --json
VERCEL_PLUGIN_TELEMETRY=off bun run src/cli/index.ts explain middleware.ts --json

These commands inspect strings; they do not execute eve. No eve project or eve installation is needed.

Expected behavior

explain, whose help promises to show matching skills for a file path or Bash command, should recognize eve info as Bash and report the existing eve skill match. Real file inputs should retain their file matching behavior.

Actual behavior

All four commands exit successfully. Selected JSON fields are:

{"target":"eve info","targetType":"file","matches":[],"injectedCount":0}
{"target":"eve info --help","targetType":"bash","skills":["eve"],"injectedCount":1}
{"target":"npx eve info","targetType":"bash","skills":["eve"],"injectedCount":1}
{"target":"middleware.ts","targetType":"file","skills":["auth","routing-middleware"],"injectedCount":1}

The skills arrays above summarize the skill names in each returned matches array. Calling the exported explain function with { toolName: "Bash" } for the original input also returns the eve match, but the CLI exposes no such override.

Runtime or environment

  • Plugin: version 0.54.1, current main at 2a163af1e4b9ba5f8a02de3737eb0c884e21d765.
  • Runtime: Bun 1.4.4, Linux x86_64.

Evidence

  • Expected source: src/cli/index.ts:30 describes explain <target> as showing matching skills for a file path or Bash command; skills/eve/SKILL.md:20 includes the info command in its Bash pattern.
  • Failure source: the executed CLI outputs above; src/cli/explain.ts:87-98 classifies whitespace-containing targets through a fixed command-name list or the presence of a flag, then falls back to file. That list omits eve.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

Restoration check

The first command should report targetType: "bash" and an eve skill match for the same input. Keep the two command controls matching eve and the middleware.ts control classified as a file. Confirm the result through the public CLI, rather than only through the function's explicit tool-name override.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: The supported matching diagnostic returns a false negative for a real eve command, which can misdirect routing investigations. The demonstrated scope is the diagnostic CLI; default agent hook behavior is not shown to fail.
  • Workaround status: available
  • Workaround basis: Passing eve info --help to the diagnostic returns the eve match in the observed control. The diagnostic only analyzes that string, so this does not execute a different eve operation.
Lingua principale
TypeScript
Stelle
336
Fork
80
Merge medio
3g 10h
PR unite (30g)
68

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 vercel/vercel-plugin

Tutte le issue di vercel/vercel-plugin

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.