contextl 1.2.41 → 1.2.43

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.41",
3
+ "version": "1.2.43",
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",
@@ -11,6 +11,9 @@ def install_mcp():
11
11
  # Define common MCP configuration paths
12
12
  targets = []
13
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
+
14
17
  # 1. Antigravity
15
18
  targets.append(home / ".gemini" / "config" / "mcp_config.json")
16
19
 
@@ -56,9 +59,6 @@ def install_mcp():
56
59
  if "mcpServers" not in config:
57
60
  config["mcpServers"] = {}
58
61
 
59
- # Determine ecosystem
60
- is_npm = sys.argv[0].endswith("mcp_server.py") or "node_modules" in __file__
61
-
62
62
  # Inject contextl
63
63
  if is_npm:
64
64
  config["mcpServers"]["contextl"] = {
@@ -75,15 +75,14 @@ def install_mcp():
75
75
  with open(path, "w", encoding="utf-8") as f:
76
76
  json.dump(config, f, indent=2)
77
77
 
78
- print(f" Successfully injected ContextL MCP Server into: {path}")
78
+ print(f"[SUCCESS] Successfully injected ContextL MCP Server into: {path}")
79
79
  success_count += 1
80
80
  except Exception as e:
81
- print(f" Failed to parse or write to {path}: {e}")
81
+ print(f"[ERROR] Failed to parse or write to {path}: {e}")
82
82
 
83
83
  if success_count > 0:
84
84
  print("\nInstallation successful! Please restart your IDE or AI Client (e.g. reload the window) for the changes to take effect.")
85
85
  else:
86
- is_npm = sys.argv[0].endswith("mcp_server.py") or "node_modules" in __file__
87
86
  print("No supported MCP configuration files were found automatically.")
88
87
  print("You may need to manually add the following JSON to your MCP configuration:")
89
88
  if is_npm: