What problem does this solve?
Vue projects using unplugin-vue-components never write an import statement for components used in templates, the plugin injects the resolution at build time
Static analysis has no way to know that <SomeComponent> in Home.vue's template resolves to src/components/SomeComponent.vue, so search_code/query_graph/trace_path can't trace template
unplugin-vue-components already computes this exact resolution and can dump it as a JSON manifest via its dumpComponentsInfo option (merged upstream, unplugin/unplugin-vue-components#830):
// .components-info.json
[
// Standard component
{ "name": "default", "as": "SomeComponent", "from": "/abs/path/src/components/SomeComponent.vue" },
{ ... },
// VueRouter specific
{
"from": "vue-router",
"name": "RouterView",
"as": "RouterView"
},
{
"from": "vue-router",
"name": "RouterLink",
"as": "RouterLink"
}
]
This is structurally identical to the dbt target/manifest.json case already solved by ingest_dbt_manifest (#576 / PR #583
Proposed solution
Add an opt-in MCP tool, following the ingest_dbt_manifest pattern:
ingest_vue_components_manifest { project, manifest_path }
- Runs post-
index_repository against an existing store — augments, doesn't fabricate.
- Reads the
{name, as, from}[] manifest.
- For each entry, resolve
as (the template tag name) against existing template-usage sites already extracted from .vue files, and add an IMPORTS edge from the usage site to the from file's Module/File node.
- No schema change needed, reuses
cbm_store_upsert_node / cbm_store_insert_edge and the existing IMPORTS edge type, same as ingest_dbt_manifest reuses DEPENDS_ON
Alternatives considered
Parse components.d.ts (the dts output) instead : it also lists all resolved components, so it needs no extra plugin option
Rejected because it requires a bespoke TS-declaration parser vs flat JSON, and dumpComponentsInfo is the format the plugin author explicitly built for external tool consumption
Confirmations
What problem does this solve?
Vue projects using
unplugin-vue-componentsnever write animportstatement for components used in templates, the plugin injects the resolution at build timeStatic analysis has no way to know that
<SomeComponent>inHome.vue's template resolves tosrc/components/SomeComponent.vue, sosearch_code/query_graph/trace_pathcan't trace templateunplugin-vue-componentsalready computes this exact resolution and can dump it as a JSON manifest via itsdumpComponentsInfooption (merged upstream, unplugin/unplugin-vue-components#830):This is structurally identical to the dbt
target/manifest.jsoncase already solved byingest_dbt_manifest(#576 / PR #583Proposed solution
Add an opt-in MCP tool, following the
ingest_dbt_manifestpattern:index_repositoryagainst an existing store — augments, doesn't fabricate.{name, as, from}[]manifest.as(the template tag name) against existing template-usage sites already extracted from.vuefiles, and add anIMPORTSedge from the usage site to thefromfile'sModule/Filenode.cbm_store_upsert_node/cbm_store_insert_edgeand the existingIMPORTSedge type, same asingest_dbt_manifestreusesDEPENDS_ONAlternatives considered
Parse
components.d.ts(thedtsoutput) instead : it also lists all resolved components, so it needs no extra plugin optionRejected because it requires a bespoke TS-declaration parser vs flat JSON, and
dumpComponentsInfois the format the plugin author explicitly built for external tool consumptionConfirmations