MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / entryRole

Function entryRole

graph-ui/src/architecture/repository-guide.ts:9–16  ·  view source on GitHub ↗
(node: GraphNode)

Source from the content-addressed store, hash-verified

7
8/** Labels are navigation heuristics; they do not promote a name into a verified entry point. */
9export function entryRole(node: GraphNode): EntryRole {
10 const path = node.file_path ?? '';
11 if (node.status === 'test' || /(^|\/)(tests?|fixtures?|verification|eval)(\/|\.)|\.(test|spec)\./i.test(path)) return 'Tests';
12 if (/(^|\/)(scripts?|tools?|hooks?|examples?|benchmarks?)(\/|\.)/i.test(path)
13 || /(^|\/)(install|uninstall|setup)\.[^/]+$/i.test(path)) return 'Tools';
14 if (/\.(tsx|jsx|vue|svelte)$/.test(path)) return 'Frontend';
15 return 'Application';
16}
17
18export function entryCandidates(nodes: GraphNode[]): GraphNode[] {
19 return nodes.filter(node => node.file_path && node.status === 'entry')

Callers 4

RepositoryMapViewFunction · 0.90
entryCandidatesFunction · 0.85
entryRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected