conduct-cli 0.7.35__tar.gz → 0.7.37__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.7.35 → conduct_cli-0.7.37}/PKG-INFO +1 -1
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/pyproject.toml +1 -1
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/guard.py +40 -2
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/README.md +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/setup.cfg +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/setup.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/guardmcp.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/__init__.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/base.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/posttooluse.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/precompact.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/pretooluse.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/session_parser.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/session_report_push.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/session_start.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/hooks/stop.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/log_util.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/main.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/mcp_server.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/memory.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/paxel.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli/tool_groups.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/src/conduct_cli.egg-info/top_level.txt +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_advisory_and_hook.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_api_client.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_bash_operator_signature.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_blast_radius.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_cmd_run.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_command_word_matcher.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_drain_daemon_health.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_guard_policy.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_guard_savings.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_hook_dispatch.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_journal_drain.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_log_util.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_proxy_coverage.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_proxy_env.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_signed_policy.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_switch.py +0 -0
- {conduct_cli-0.7.35 → conduct_cli-0.7.37}/tests/test_token_lifecycle.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "conduct-cli"
|
|
7
|
-
version = "0.7.
|
|
7
|
+
version = "0.7.37"
|
|
8
8
|
description = "CLI for Conduct AI — secure, govern, install agents, manage projects, run tests"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -381,6 +381,7 @@ _MCP_TARGETS = [
|
|
|
381
381
|
(Path.home() / ".cursor" / "mcp.json", "Cursor"),
|
|
382
382
|
(Path.home() / ".windsurf" / "mcp.json", "Windsurf"),
|
|
383
383
|
(Path.home() / ".codex" / "mcp.json", "Codex"),
|
|
384
|
+
# ~/.copilot/mcp-config.json handled separately by _patch_copilot_mcp (SSE + token)
|
|
384
385
|
# Claude Desktop — only if already installed
|
|
385
386
|
(Path.home() / "Library" / "Application Support" / "Claude" / "claude_desktop_config.json", "Claude Desktop"),
|
|
386
387
|
(Path.home() / "AppData" / "Roaming" / "Claude" / "claude_desktop_config.json", "Claude Desktop"),
|
|
@@ -401,11 +402,17 @@ def _register_mcp(workspace_id: str, agent_token: str, api_url: str) -> None:
|
|
|
401
402
|
if shutil.which("booster"):
|
|
402
403
|
servers["agent-booster"] = {"command": "booster", "args": ["serve"]}
|
|
403
404
|
|
|
404
|
-
|
|
405
|
+
vscode_paths = _vscode_mcp_paths()
|
|
406
|
+
targets = list(_MCP_TARGETS) + vscode_paths
|
|
407
|
+
vscode_cfg_paths = {p for p, _ in vscode_paths}
|
|
405
408
|
found_any = False
|
|
406
409
|
for cfg_path, label in targets:
|
|
407
410
|
if not cfg_path.exists():
|
|
408
|
-
|
|
411
|
+
# Create mcp.json for VS Code if Copilot is confirmed installed
|
|
412
|
+
if cfg_path in vscode_cfg_paths:
|
|
413
|
+
cfg_path.write_text("{}")
|
|
414
|
+
else:
|
|
415
|
+
continue
|
|
409
416
|
found_any = True
|
|
410
417
|
try:
|
|
411
418
|
existing = json.loads(cfg_path.read_text())
|
|
@@ -425,6 +432,9 @@ def _register_mcp(workspace_id: str, agent_token: str, api_url: str) -> None:
|
|
|
425
432
|
if not found_any:
|
|
426
433
|
print(f" {GRAY}No AI tool configs found for MCP registration{RESET}")
|
|
427
434
|
|
|
435
|
+
# GitHub Copilot uses SSE + Bearer token (can't run local stdio process via mcp-config.json)
|
|
436
|
+
_patch_copilot_mcp(agent_token, api_url)
|
|
437
|
+
|
|
428
438
|
# Claude Desktop doesn't source shell env — patch apiBaseUrl directly in config
|
|
429
439
|
# so all LLM calls route through the Guard proxy (PII blocking, spend limits, audit).
|
|
430
440
|
_patch_claude_desktop_proxy(api_url, agent_token)
|
|
@@ -462,6 +472,34 @@ def _patch_claude_desktop_proxy(api_url: str, agent_token: str) -> None:
|
|
|
462
472
|
print(f" {YELLOW}Restart Claude Desktop for proxy routing to take effect{RESET}")
|
|
463
473
|
|
|
464
474
|
|
|
475
|
+
def _patch_copilot_mcp(agent_token: str, api_url: str) -> None:
|
|
476
|
+
"""Keep ~/.copilot/mcp-config.json in sync with current agent token.
|
|
477
|
+
|
|
478
|
+
Copilot's mcp-config.json uses SSE + Bearer — it can't run a local stdio binary
|
|
479
|
+
the way Claude Code / Cursor can, so we write the SSE entry with a fresh token.
|
|
480
|
+
"""
|
|
481
|
+
cfg_path = Path.home() / ".copilot" / "mcp-config.json"
|
|
482
|
+
if not cfg_path.exists():
|
|
483
|
+
return
|
|
484
|
+
try:
|
|
485
|
+
cfg = json.loads(cfg_path.read_text())
|
|
486
|
+
except (json.JSONDecodeError, OSError):
|
|
487
|
+
cfg = {}
|
|
488
|
+
mcp = cfg.setdefault("mcpServers", {})
|
|
489
|
+
entry = {
|
|
490
|
+
"type": "sse",
|
|
491
|
+
"url": f"{api_url}/guard/mcp",
|
|
492
|
+
"headers": {"Authorization": f"Bearer {agent_token}"},
|
|
493
|
+
"tools": ["**"],
|
|
494
|
+
}
|
|
495
|
+
if mcp.get("conduct-guard") == entry:
|
|
496
|
+
print(f" {GRAY}conduct-guard MCP already registered in GitHub Copilot{RESET}")
|
|
497
|
+
return
|
|
498
|
+
mcp["conduct-guard"] = entry
|
|
499
|
+
cfg_path.write_text(json.dumps(cfg, indent=2))
|
|
500
|
+
print(f" {GREEN}conduct-guard MCP registered in GitHub Copilot (SSE){RESET}")
|
|
501
|
+
|
|
502
|
+
|
|
465
503
|
def _patch_cursor_global_rules() -> None:
|
|
466
504
|
"""Write ConductGuard policy rules into Cursor's global user rules setting.
|
|
467
505
|
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|