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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.4.30
3
+ Version: 0.4.32
4
4
  Summary: CLI for Conduct AI — install agents, manage projects, run tests
5
5
  Author-email: Conduct AI <hello@conductai.ai>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "conduct-cli"
7
- version = "0.4.30"
7
+ version = "0.4.32"
8
8
  description = "CLI for Conduct AI — install agents, manage projects, run tests"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -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
- auth = token or api_key
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
- auth = token or api_key
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
- if shutil.which("claude"):
427
- try:
428
- result = subprocess.run(
429
- ["claude", "mcp", "add", "conduct", "conduct-mcp"],
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():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.4.30
3
+ Version: 0.4.32
4
4
  Summary: CLI for Conduct AI — install agents, manage projects, run tests
5
5
  Author-email: Conduct AI <hello@conductai.ai>
6
6
  License: MIT
File without changes
File without changes
File without changes