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 +1 -0
- package/package.json +1 -1
- package/python/installer.py +5 -6
package/bin/contextl.js
CHANGED
package/package.json
CHANGED
package/python/installer.py
CHANGED
|
@@ -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"
|
|
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"
|
|
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:
|