conduct-cli 0.4.30__tar.gz → 0.4.32__tar.gz
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.
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/PKG-INFO +1 -1
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/pyproject.toml +1 -1
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli/guard.py +15 -5
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli/main.py +10 -22
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/README.md +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/setup.cfg +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/setup.py +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli/guardmcp.py +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli/mcp_server.py +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.4.30 → conduct_cli-0.4.32}/src/conduct_cli.egg-info/top_level.txt +0 -0
|
@@ -934,15 +934,25 @@ def _report_tools_to_server() -> None:
|
|
|
934
934
|
if not email:
|
|
935
935
|
return
|
|
936
936
|
|
|
937
|
+
# Also pull conduct API key for X-Api-Key auth (member_token is not accepted by this endpoint)
|
|
938
|
+
conduct_cfg_path = Path.home() / ".conduct" / "config.json"
|
|
939
|
+
conduct_api_key = ""
|
|
940
|
+
if conduct_cfg_path.exists():
|
|
941
|
+
try:
|
|
942
|
+
conduct_api_key = json.loads(conduct_cfg_path.read_text()).get("api_key", "")
|
|
943
|
+
except Exception:
|
|
944
|
+
pass
|
|
945
|
+
|
|
937
946
|
payload = json.dumps({"email": email, "tools": tools}).encode()
|
|
938
|
-
|
|
947
|
+
headers = {"Content-Type": "application/json"}
|
|
948
|
+
if conduct_api_key and conduct_api_key.startswith("cond_live_"):
|
|
949
|
+
headers["X-Api-Key"] = conduct_api_key
|
|
950
|
+
elif token:
|
|
951
|
+
headers["Authorization"] = f"Bearer {token}"
|
|
939
952
|
req = urllib.request.Request(
|
|
940
953
|
f"{base_url}/guard/developer-tools",
|
|
941
954
|
data=payload,
|
|
942
|
-
headers=
|
|
943
|
-
"Content-Type": "application/json",
|
|
944
|
-
"Authorization": f"Bearer {auth}",
|
|
945
|
-
},
|
|
955
|
+
headers=headers,
|
|
946
956
|
method="POST",
|
|
947
957
|
)
|
|
948
958
|
urllib.request.urlopen(req, timeout=8)
|
|
@@ -400,14 +400,15 @@ def _report_tool_coverage() -> None:
|
|
|
400
400
|
return
|
|
401
401
|
|
|
402
402
|
payload = json.dumps({"email": email, "tools": tools}).encode()
|
|
403
|
-
|
|
403
|
+
headers = {"Content-Type": "application/json"}
|
|
404
|
+
if api_key and api_key.startswith("cond_live_"):
|
|
405
|
+
headers["X-Api-Key"] = api_key
|
|
406
|
+
elif token:
|
|
407
|
+
headers["Authorization"] = f"Bearer {token}"
|
|
404
408
|
req = urllib.request.Request(
|
|
405
409
|
f"{server}/guard/developer-tools",
|
|
406
410
|
data=payload,
|
|
407
|
-
headers=
|
|
408
|
-
"Content-Type": "application/json",
|
|
409
|
-
"Authorization": f"Bearer {auth}",
|
|
410
|
-
},
|
|
411
|
+
headers=headers,
|
|
411
412
|
method="POST",
|
|
412
413
|
)
|
|
413
414
|
urllib.request.urlopen(req, timeout=8)
|
|
@@ -423,23 +424,10 @@ def cmd_mcp_install(args):
|
|
|
423
424
|
registered = []
|
|
424
425
|
|
|
425
426
|
# --- Claude Code ---
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
capture_output=True, text=True, timeout=15,
|
|
431
|
-
)
|
|
432
|
-
if result.returncode == 0:
|
|
433
|
-
registered.append("Claude Code")
|
|
434
|
-
else:
|
|
435
|
-
_write_claude_mcp_settings()
|
|
436
|
-
registered.append("Claude Code (settings.json)")
|
|
437
|
-
except Exception:
|
|
438
|
-
_write_claude_mcp_settings()
|
|
439
|
-
registered.append("Claude Code (settings.json)")
|
|
440
|
-
else:
|
|
441
|
-
if _write_claude_mcp_settings():
|
|
442
|
-
registered.append("Claude Code (settings.json)")
|
|
427
|
+
# Write directly to ~/.claude/settings.json — `claude mcp add` without --global
|
|
428
|
+
# writes to the project-level .claude/settings.json which _detect_ai_tools won't find.
|
|
429
|
+
if _write_claude_mcp_settings():
|
|
430
|
+
registered.append("Claude Code")
|
|
443
431
|
|
|
444
432
|
# --- Codex CLI ---
|
|
445
433
|
if _write_codex_mcp_config():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|