Skip to content

Add eve (Vercel framework) plugin#1864

Merged
webpro merged 2 commits into
webpro-nl:mainfrom
jakeleventhal:codex/eve-plugin
Jul 7, 2026
Merged

Add eve (Vercel framework) plugin#1864
webpro merged 2 commits into
webpro-nl:mainfrom
jakeleventhal:codex/eve-plugin

Conversation

@jakeleventhal

@jakeleventhal jakeleventhal commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What changed

Adds a Knip plugin for eve, enabled when the eve package is present. The plugin marks Eve's filesystem-discovered agent files as production entries, including root/flat agent layouts, authored runtime slots (tools, skills, channels, connections, hooks, schedules, sandbox files), and nested subagent slots.

The fixture intentionally includes an unused agent/lib/unused.ts file so the test verifies the plugin does not glob every TypeScript file under agent/ as an entry.

Why

Eve discovers agent capabilities from the filesystem rather than from a central import registry. Without a Knip plugin, real Eve apps have to add broad project-level entry globs such as agent/**/*.ts, which prevents Knip from reporting genuine unused helper files/exports under the agent tree.

Validation

  • bun test test/plugins/eve.test.ts
  • pnpm build

@pkg-pr-new

pkg-pr-new Bot commented Jul 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/knip@1864
npm i https://pkg.pr.new/@knip/language-server@1864
npm i https://pkg.pr.new/@knip/mcp@1864

commit: 56b27db

@jakeleventhal jakeleventhal changed the title Add eve plugin Add eve (Vercel framework) plugin Jul 5, 2026
@jakeleventhal
jakeleventhal marked this pull request as ready for review July 5, 2026 16:20
`{,agent/}{channels,connections,hooks,skills,tools,schedules}/**/*.${extensions}`,
`{,agent/}subagents/**/${agentFileNames}.${extensions}`,
`{,agent/}subagents/**/sandbox/sandbox.${extensions}`,
`{,agent/}subagents/**/{connections,hooks,skills,tools}/**/*.${extensions}`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subagent slots here are {connections,hooks,skills,tools}, but the root-level slots on line 19 also include channels and schedules. If Eve auto-discovers those inside subagents (e.g. agent/subagents/x/schedules/daily.ts or .../channels/slack.ts), they won't be marked as entries and will surface as false-positive unused files. If subagents genuinely can't own channels/schedules, could you confirm that against Eve's project-layout docs? The asymmetry isn't obvious from the code alone.

@jakeleventhal jakeleventhal Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in jakeleventhal@56b27db. I confirmed Eve project-layout docs list channels and schedules as root-only, so the plugin keeps subagent slots limited to connections, hooks, skills, tools, and sandbox/instructions/agent files. The fixture now includes unsupported subagent channels/schedules files and asserts they remain reported as unused.

Comment thread packages/knip/src/plugins/eve/index.ts Outdated

const extensions = '{js,jsx,ts,tsx,mjs,cjs,mts,cts}';

const agentFileNames = '{agent,instructions,instrumentation,sandbox}';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instructions and instrumentation aren't in the slot list from the PR description, and no fixture covers either (instrumentation looks like it may have carried over from the Next plugin's rootOrSrc line). If they aren't real Eve-discovered filenames, these globs silently broaden the entry set and can mask genuinely-unused instructions.ts/instrumentation.ts files — the exact false-negative this plugin is meant to prevent. Could you confirm they're real Eve conventions, and add fixture coverage for the untested slots (skills, instructions, instrumentation, and the subagent variants) either way?

@jakeleventhal jakeleventhal Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in jakeleventhal@56b27db. Eve docs confirm instructions.ts and root instrumentation.ts are real conventions, with instrumentation root-only. I split root/subagent filename globs so subagent instrumentation no longer gets masked, and added fixture coverage for root skills/instructions/instrumentation plus subagent connections/hooks/instructions/sandbox/skills and unsupported subagent instrumentation.

@webpro
webpro merged commit 20cd970 into webpro-nl:main Jul 7, 2026
30 checks passed
@webpro

webpro commented Jul 7, 2026

Copy link
Copy Markdown
Member

You're on a roll Jake, much appreciated!

@webpro

webpro commented Jul 7, 2026

Copy link
Copy Markdown
Member

🚀 This pull request is included in v6.25.0. See Release 6.25.0 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants