@glock-org/glock 1.1.46 → 1.1.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glock-org/glock",
3
- "version": "1.1.46",
3
+ "version": "1.1.48",
4
4
  "description": "Glock - AI Coding Assistant CLI",
5
5
  "keywords": [
6
6
  "glock",
@@ -174,6 +174,16 @@ async function installPythonDependencies() {
174
174
  'pillow>=10.0.0',
175
175
  'textual>=0.47.0,<1.0.0', // Pin to 0.x - version 1.0+ has breaking changes
176
176
  ];
177
+
178
+ // Optional packages for enhanced features (Code Graph)
179
+ // These provide better AST parsing but fall back to regex if unavailable
180
+ const optionalPackages = [
181
+ 'tree-sitter>=0.21.0',
182
+ 'tree-sitter-python>=0.21.0',
183
+ 'tree-sitter-javascript>=0.21.0',
184
+ 'tree-sitter-typescript>=0.21.0',
185
+ ];
186
+
177
187
  const pipCmd = `${pythonCmd} -m pip install --user --quiet ${packages.join(' ')}`;
178
188
 
179
189
  try {
@@ -206,6 +216,27 @@ async function installPythonDependencies() {
206
216
  console.log('');
207
217
  }
208
218
  }
219
+
220
+ // Install optional packages for Code Graph (non-blocking)
221
+ console.log('Installing Code Graph dependencies (tree-sitter)...');
222
+ const optPipCmd = `${pythonCmd} -m pip install --user --quiet ${optionalPackages.join(' ')}`;
223
+
224
+ try {
225
+ execSync(optPipCmd, { stdio: 'pipe' });
226
+ console.log('Code Graph dependencies installed.');
227
+ } catch (err) {
228
+ // Try without --user flag
229
+ try {
230
+ const optPipCmdNoUser = `${pythonCmd} -m pip install --quiet ${optionalPackages.join(' ')}`;
231
+ execSync(optPipCmdNoUser, { stdio: 'pipe' });
232
+ console.log('Code Graph dependencies installed.');
233
+ } catch (err2) {
234
+ // Non-fatal - Code Graph will use regex fallback
235
+ console.log('Note: tree-sitter not installed. Code Graph will use regex fallback.');
236
+ console.log(' For better accuracy, manually run:');
237
+ console.log(` ${pythonCmd} -m pip install tree-sitter tree-sitter-python tree-sitter-javascript`);
238
+ }
239
+ }
209
240
  }
210
241
 
211
242
  /**