contextl 1.2.40 → 1.2.42

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/bin/contextl.js CHANGED
@@ -143,6 +143,7 @@ function launchServer(python) {
143
143
  ...process.env,
144
144
  PYTHONPATH: PYTHON_DIR,
145
145
  PYTHONUNBUFFERED: "1",
146
+ CONTEXTL_ECOSYSTEM: "npm",
146
147
  },
147
148
  });
148
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contextl",
3
- "version": "1.2.40",
3
+ "version": "1.2.42",
4
4
  "description": "contextl — finds the most relevant files in your codebase for any change request. MCP server for AI coding agents.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import json
3
3
  import platform
4
+ import sys
4
5
  from pathlib import Path
5
6
 
6
7
  def install_mcp():
@@ -10,6 +11,9 @@ def install_mcp():
10
11
  # Define common MCP configuration paths
11
12
  targets = []
12
13
 
14
+ # Default to pip/direct invocation if not explicitly set by the npm wrapper
15
+ is_npm = os.environ.get("CONTEXTL_ECOSYSTEM") == "npm"
16
+
13
17
  # 1. Antigravity
14
18
  targets.append(home / ".gemini" / "config" / "mcp_config.json")
15
19
 
@@ -55,9 +59,6 @@ def install_mcp():
55
59
  if "mcpServers" not in config:
56
60
  config["mcpServers"] = {}
57
61
 
58
- # Determine ecosystem
59
- is_npm = sys.argv[0].endswith("mcp_server.py") or "node_modules" in __file__
60
-
61
62
  # Inject contextl
62
63
  if is_npm:
63
64
  config["mcpServers"]["contextl"] = {
@@ -82,7 +83,6 @@ def install_mcp():
82
83
  if success_count > 0:
83
84
  print("\nInstallation successful! Please restart your IDE or AI Client (e.g. reload the window) for the changes to take effect.")
84
85
  else:
85
- is_npm = sys.argv[0].endswith("mcp_server.py") or "node_modules" in __file__
86
86
  print("No supported MCP configuration files were found automatically.")
87
87
  print("You may need to manually add the following JSON to your MCP configuration:")
88
88
  if is_npm: