code-graph-context 3.0.1 → 3.0.3
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.
|
@@ -14,7 +14,7 @@ const DEFAULT_CONFIG = {
|
|
|
14
14
|
host: '127.0.0.1',
|
|
15
15
|
model: process.env.EMBEDDING_MODEL ?? 'codesage/codesage-base-v2',
|
|
16
16
|
startupTimeoutMs: 120_000, // 2 min — first run downloads the model
|
|
17
|
-
requestTimeoutMs:
|
|
17
|
+
requestTimeoutMs: parseInt(process.env.EMBEDDING_REQUEST_TIMEOUT_MS ?? '', 10) || 120_000,
|
|
18
18
|
idleTimeoutMs: 180_000, // 3 min — auto-shutdown after no requests
|
|
19
19
|
};
|
|
20
20
|
export class EmbeddingSidecar {
|
|
@@ -87,7 +87,38 @@ export class WorkspaceDetector {
|
|
|
87
87
|
*/
|
|
88
88
|
async getWorkspacePatterns(rootPath, type) {
|
|
89
89
|
switch (type) {
|
|
90
|
-
case 'turborepo':
|
|
90
|
+
case 'turborepo': {
|
|
91
|
+
// Turborepo uses the package manager's workspace config.
|
|
92
|
+
// Check pnpm-workspace.yaml first, then package.json workspaces, then defaults.
|
|
93
|
+
const turboPnpmPath = path.join(rootPath, 'pnpm-workspace.yaml');
|
|
94
|
+
if (await this.fileExists(turboPnpmPath)) {
|
|
95
|
+
try {
|
|
96
|
+
const content = await fs.readFile(turboPnpmPath, 'utf-8');
|
|
97
|
+
const config = YAML.parse(content);
|
|
98
|
+
if (config?.packages && Array.isArray(config.packages)) {
|
|
99
|
+
return config.packages;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// Fall through
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// Turbo with Yarn/npm workspaces — read from package.json
|
|
107
|
+
const turboPackageJsonPath = path.join(rootPath, 'package.json');
|
|
108
|
+
try {
|
|
109
|
+
const packageJson = JSON.parse(await fs.readFile(turboPackageJsonPath, 'utf-8'));
|
|
110
|
+
if (Array.isArray(packageJson.workspaces)) {
|
|
111
|
+
return packageJson.workspaces;
|
|
112
|
+
}
|
|
113
|
+
if (packageJson.workspaces?.packages) {
|
|
114
|
+
return packageJson.workspaces.packages;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
// Fall through to defaults
|
|
119
|
+
}
|
|
120
|
+
return ['apps/*', 'packages/*'];
|
|
121
|
+
}
|
|
91
122
|
case 'pnpm': {
|
|
92
123
|
// pnpm-workspace.yaml defines packages
|
|
93
124
|
const pnpmWorkspacePath = path.join(rootPath, 'pnpm-workspace.yaml');
|
|
@@ -103,8 +134,7 @@ export class WorkspaceDetector {
|
|
|
103
134
|
// Fall through to defaults
|
|
104
135
|
}
|
|
105
136
|
}
|
|
106
|
-
|
|
107
|
-
return ['apps/*', 'packages/*'];
|
|
137
|
+
return ['packages/*'];
|
|
108
138
|
}
|
|
109
139
|
case 'nx': {
|
|
110
140
|
// For Nx, scan for all project.json files to find all projects
|
package/dist/mcp/constants.js
CHANGED
|
@@ -212,9 +212,9 @@ export const PARSING = {
|
|
|
212
212
|
/** File count threshold to trigger streaming import */
|
|
213
213
|
streamingThreshold: 100,
|
|
214
214
|
/** Default number of files per chunk */
|
|
215
|
-
defaultChunkSize:
|
|
216
|
-
/** Worker timeout in milliseconds (
|
|
217
|
-
workerTimeoutMs:
|
|
215
|
+
defaultChunkSize: 50,
|
|
216
|
+
/** Worker timeout in milliseconds (60 minutes) */
|
|
217
|
+
workerTimeoutMs: 60 * 60 * 1000,
|
|
218
218
|
};
|
|
219
219
|
// Job Management
|
|
220
220
|
export const JOBS = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-graph-context",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "MCP server that builds code graphs to provide rich context to LLMs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/andrew-hernandez-paragon/code-graph-context#readme",
|