gitnexus 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -121,8 +121,6 @@ Your AI agent gets these tools automatically:
121
121
  | `gitnexus://repo/{name}/process/{name}` | Full process trace |
122
122
  | `gitnexus://repo/{name}/schema` | Graph schema for Cypher queries |
123
123
 
124
- > Legacy URIs (`gitnexus://context`, etc.) still work for single-repo setups.
125
-
126
124
  ## CLI Commands
127
125
 
128
126
  ```bash
package/dist/cli/index.js CHANGED
@@ -11,7 +11,7 @@ const program = new Command();
11
11
  program
12
12
  .name('gitnexus')
13
13
  .description('GitNexus local CLI and MCP server')
14
- .version('1.1.0');
14
+ .version('1.1.1');
15
15
  program
16
16
  .command('setup')
17
17
  .description('One-time setup: configure MCP for Cursor, Claude Code, OpenCode')
@@ -11,19 +11,9 @@ export interface CodebaseContext {
11
11
  stats: {
12
12
  fileCount: number;
13
13
  functionCount: number;
14
- classCount: number;
15
- interfaceCount: number;
16
- methodCount: number;
17
14
  communityCount: number;
18
15
  processCount: number;
19
16
  };
20
- hotspots: Array<{
21
- name: string;
22
- type: string;
23
- filePath: string;
24
- connections: number;
25
- }>;
26
- folderTree: string;
27
17
  }
28
18
  interface RepoHandle {
29
19
  id: string;
@@ -57,24 +47,10 @@ export declare class LocalBackend {
57
47
  */
58
48
  resolveRepo(repoParam?: string): RepoHandle;
59
49
  private ensureInitialized;
60
- get isReady(): boolean;
61
50
  /**
62
51
  * Get context for a specific repo (or the single repo if only one).
63
52
  */
64
53
  getContext(repoId?: string): CodebaseContext | null;
65
- /**
66
- * Backwards-compatible getter — returns context of single repo or null.
67
- */
68
- get context(): CodebaseContext | null;
69
- getRepoPath(repoId?: string): string | null;
70
- get repoPath(): string | null;
71
- getMeta(repoId?: string): {
72
- lastCommit: string;
73
- indexedAt: string;
74
- stats?: any;
75
- } | null;
76
- get meta(): any;
77
- get storagePath(): string | null;
78
54
  /**
79
55
  * List all registered repos with their metadata.
80
56
  */
@@ -57,14 +57,9 @@ export class LocalBackend {
57
57
  stats: {
58
58
  fileCount: s.files || 0,
59
59
  functionCount: s.nodes || 0,
60
- classCount: 0,
61
- interfaceCount: 0,
62
- methodCount: 0,
63
60
  communityCount: s.communities || 0,
64
61
  processCount: s.processes || 0,
65
62
  },
66
- hotspots: [],
67
- folderTree: '',
68
63
  });
69
64
  }
70
65
  return this.repos.size > 0;
@@ -137,9 +132,6 @@ export class LocalBackend {
137
132
  this.initializedRepos.add(repoId);
138
133
  }
139
134
  // ─── Public Getters ──────────────────────────────────────────────
140
- get isReady() {
141
- return this.repos.size > 0;
142
- }
143
135
  /**
144
136
  * Get context for a specific repo (or the single repo if only one).
145
137
  */
@@ -152,38 +144,6 @@ export class LocalBackend {
152
144
  }
153
145
  return null;
154
146
  }
155
- /**
156
- * Backwards-compatible getter — returns context of single repo or null.
157
- */
158
- get context() {
159
- return this.getContext();
160
- }
161
- getRepoPath(repoId) {
162
- if (repoId)
163
- return this.repos.get(repoId)?.repoPath ?? null;
164
- if (this.repos.size === 1)
165
- return this.repos.values().next().value?.repoPath ?? null;
166
- return null;
167
- }
168
- get repoPath() {
169
- return this.getRepoPath();
170
- }
171
- getMeta(repoId) {
172
- const handle = repoId
173
- ? this.repos.get(repoId)
174
- : this.repos.size === 1 ? this.repos.values().next().value : null;
175
- if (!handle)
176
- return null;
177
- return { lastCommit: handle.lastCommit, indexedAt: handle.indexedAt, stats: handle.stats };
178
- }
179
- get meta() {
180
- return this.getMeta();
181
- }
182
- get storagePath() {
183
- if (this.repos.size === 1)
184
- return this.repos.values().next().value?.storagePath ?? null;
185
- return null;
186
- }
187
147
  /**
188
148
  * List all registered repos with their metadata.
189
149
  */
@@ -772,14 +732,9 @@ export class LocalBackend {
772
732
  stats: {
773
733
  fileCount: newMeta.stats.files || 0,
774
734
  functionCount: newMeta.stats.nodes || 0,
775
- classCount: 0,
776
- interfaceCount: 0,
777
- methodCount: 0,
778
735
  communityCount: newMeta.stats.communities || 0,
779
736
  processCount: newMeta.stats.processes || 0,
780
737
  },
781
- hotspots: [],
782
- folderTree: '',
783
738
  });
784
739
  console.error('GitNexus: Indexing complete!');
785
740
  return {
@@ -2,8 +2,7 @@
2
2
  * MCP Resources (Multi-Repo)
3
3
  *
4
4
  * Provides structured on-demand data to AI agents.
5
- * Supports repo-scoped URIs (gitnexus://repo/{name}/context)
6
- * and backwards-compatible global URIs (gitnexus://context).
5
+ * All resources use repo-scoped URIs: gitnexus://repo/{name}/context
7
6
  */
8
7
  import type { LocalBackend } from './local/local-backend.js';
9
8
  export interface ResourceDefinition {
@@ -2,8 +2,7 @@
2
2
  * MCP Resources (Multi-Repo)
3
3
  *
4
4
  * Provides structured on-demand data to AI agents.
5
- * Supports repo-scoped URIs (gitnexus://repo/{name}/context)
6
- * and backwards-compatible global URIs (gitnexus://context).
5
+ * All resources use repo-scoped URIs: gitnexus://repo/{name}/context
7
6
  */
8
7
  import { checkStaleness } from './staleness.js';
9
8
  /**
@@ -24,7 +23,7 @@ export function getResourceDefinitions(backend) {
24
23
  resources.push({
25
24
  uri: `gitnexus://repo/${repo.name}/context`,
26
25
  name: `${repo.name} Overview`,
27
- description: `Codebase stats, hotspots, and available tools for ${repo.name}`,
26
+ description: `Codebase stats and available tools for ${repo.name}`,
28
27
  mimeType: 'text/yaml',
29
28
  });
30
29
  resources.push({
@@ -46,10 +45,6 @@ export function getResourceDefinitions(backend) {
46
45
  mimeType: 'text/yaml',
47
46
  });
48
47
  }
49
- // Backwards compat: if only 1 repo, also expose global URIs
50
- if (repos.length === 1) {
51
- resources.push({ uri: 'gitnexus://context', name: `${repos[0].name} Overview`, description: 'Codebase stats, hotspots, and available tools', mimeType: 'text/yaml' }, { uri: 'gitnexus://clusters', name: 'All Clusters', description: 'List of all functional clusters with stats', mimeType: 'text/yaml' }, { uri: 'gitnexus://processes', name: 'All Processes', description: 'List of all execution flows with types', mimeType: 'text/yaml' }, { uri: 'gitnexus://schema', name: 'Graph Schema', description: 'Node types and relationships for Cypher queries', mimeType: 'text/yaml' });
52
- }
53
48
  return resources;
54
49
  }
55
50
  /**
@@ -69,57 +64,27 @@ export function getResourceTemplates() {
69
64
  description: 'Step-by-step execution trace',
70
65
  mimeType: 'text/yaml',
71
66
  },
72
- // Backwards-compatible templates (for single-repo setups)
73
- {
74
- uriTemplate: 'gitnexus://cluster/{name}',
75
- name: 'Cluster Detail',
76
- description: 'Deep dive into a specific cluster (single-repo shorthand)',
77
- mimeType: 'text/yaml',
78
- },
79
- {
80
- uriTemplate: 'gitnexus://process/{name}',
81
- name: 'Process Trace',
82
- description: 'Step-by-step execution trace (single-repo shorthand)',
83
- mimeType: 'text/yaml',
84
- },
85
67
  ];
86
68
  }
87
69
  /**
88
- * Parse a resource URI to extract the repo name (if present) and resource type.
70
+ * Parse a resource URI to extract the repo name and resource type.
89
71
  */
90
72
  function parseUri(uri) {
73
+ if (uri === 'gitnexus://repos')
74
+ return { resourceType: 'repos' };
91
75
  // Repo-scoped: gitnexus://repo/{name}/context
92
76
  const repoMatch = uri.match(/^gitnexus:\/\/repo\/([^/]+)\/(.+)$/);
93
77
  if (repoMatch) {
94
78
  const repoName = decodeURIComponent(repoMatch[1]);
95
79
  const rest = repoMatch[2];
96
- // gitnexus://repo/{name}/cluster/{clusterName}
97
80
  if (rest.startsWith('cluster/')) {
98
81
  return { repoName, resourceType: 'cluster', param: decodeURIComponent(rest.replace('cluster/', '')) };
99
82
  }
100
- // gitnexus://repo/{name}/process/{processName}
101
83
  if (rest.startsWith('process/')) {
102
84
  return { repoName, resourceType: 'process', param: decodeURIComponent(rest.replace('process/', '')) };
103
85
  }
104
86
  return { repoName, resourceType: rest };
105
87
  }
106
- // Global (backwards compat): gitnexus://context, gitnexus://cluster/{name}
107
- if (uri === 'gitnexus://repos')
108
- return { resourceType: 'repos' };
109
- if (uri === 'gitnexus://context')
110
- return { resourceType: 'context' };
111
- if (uri === 'gitnexus://clusters')
112
- return { resourceType: 'clusters' };
113
- if (uri === 'gitnexus://processes')
114
- return { resourceType: 'processes' };
115
- if (uri === 'gitnexus://schema')
116
- return { resourceType: 'schema' };
117
- if (uri.startsWith('gitnexus://cluster/')) {
118
- return { resourceType: 'cluster', param: decodeURIComponent(uri.replace('gitnexus://cluster/', '')) };
119
- }
120
- if (uri.startsWith('gitnexus://process/')) {
121
- return { resourceType: 'process', param: decodeURIComponent(uri.replace('gitnexus://process/', '')) };
122
- }
123
88
  throw new Error(`Unknown resource URI: ${uri}`);
124
89
  }
125
90
  /**
@@ -131,13 +96,7 @@ export async function readResource(uri, backend) {
131
96
  if (parsed.resourceType === 'repos') {
132
97
  return getReposResource(backend);
133
98
  }
134
- // Resolve the target repo
135
- let repoName;
136
- if (parsed.repoName) {
137
- repoName = parsed.repoName;
138
- }
139
- // For backwards-compat URIs without repo name, resolveRepo() will auto-detect (single-repo)
140
- // The backend.callTool already does resolveRepo internally, so we pass repoName as `repo` param.
99
+ const repoName = parsed.repoName;
141
100
  switch (parsed.resourceType) {
142
101
  case 'context':
143
102
  return getContextResource(backend, repoName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",