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

未关闭 适合新手
#388 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
85/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bun, typescript

调研方向

从 src/cli/explain.ts 第 87–98 行附近开始,这里是 CLI 对目标进行分类的地方;并查看 src/cli/index.ts 中的 explain 帮助。使用报告中的四条命令重现问题,然后检查公开 CLI 输出。完成标准是:eve info 被分类为 Bash,并匹配 eve skill;而 eve info --help、npx eve info 和 middleware.ts 保持报告中所述的行为。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
TypeScript
星标
336
派生
80
平均合并
3 天 10 小时
30 天内合并 PR
68

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

vercel/vercel-plugin 的其他 Issue

查看 vercel/vercel-plugin 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。