conduct-cli 0.6.12__tar.gz → 0.6.14__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.6.12 → conduct_cli-0.6.14}/PKG-INFO +1 -1
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/pyproject.toml +1 -1
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/guard.py +38 -2
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/README.md +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/setup.cfg +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/setup.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/guardmcp.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/hook_precompact_template.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/hook_session_start_template.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/hook_stop_template.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/hook_template.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/log_util.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/main.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/mcp_server.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/memory.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli/paxel.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/src/conduct_cli.egg-info/top_level.txt +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_bash_operator_signature.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_command_word_matcher.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_guard_policy.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_guard_savings.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_hook_syntax.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_journal_drain.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_log_util.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_proxy_env.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_signed_policy.py +0 -0
- {conduct_cli-0.6.12 → conduct_cli-0.6.14}/tests/test_switch.py +0 -0
|
@@ -305,6 +305,9 @@ _MCP_TARGETS = [
|
|
|
305
305
|
(Path.home() / ".cursor" / "mcp.json", "Cursor"),
|
|
306
306
|
(Path.home() / ".windsurf" / "mcp.json", "Windsurf"),
|
|
307
307
|
(Path.home() / ".codex" / "mcp.json", "Codex"),
|
|
308
|
+
# Claude Desktop — only if already installed
|
|
309
|
+
(Path.home() / "Library" / "Application Support" / "Claude" / "claude_desktop_config.json", "Claude Desktop"),
|
|
310
|
+
(Path.home() / "AppData" / "Roaming" / "Claude" / "claude_desktop_config.json", "Claude Desktop"),
|
|
308
311
|
]
|
|
309
312
|
|
|
310
313
|
|
|
@@ -346,6 +349,39 @@ def _register_mcp(workspace_id: str, member_token: str, api_url: str) -> None:
|
|
|
346
349
|
if not found_any:
|
|
347
350
|
print(f" {GRAY}No AI tool configs found for MCP registration{RESET}")
|
|
348
351
|
|
|
352
|
+
# Claude Desktop doesn't source shell env — patch apiBaseUrl directly in config
|
|
353
|
+
# so all LLM calls route through the Guard proxy (PII blocking, spend limits, audit).
|
|
354
|
+
_patch_claude_desktop_proxy(api_url, member_token)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
def _patch_claude_desktop_proxy(api_url: str, member_token: str) -> None:
|
|
358
|
+
"""Patch Claude Desktop config to route LLM calls through the Guard proxy.
|
|
359
|
+
|
|
360
|
+
Claude Desktop reads apiBaseUrl from its config JSON — it does not source
|
|
361
|
+
shell env vars, so ANTHROPIC_BASE_URL has no effect. We write the proxy
|
|
362
|
+
URL directly so PII blocking, spend limits, and audit apply to Desktop too.
|
|
363
|
+
"""
|
|
364
|
+
proxy_url = f"{api_url}/proxy/anthropic"
|
|
365
|
+
candidates = [
|
|
366
|
+
Path.home() / "Library" / "Application Support" / "Claude" / "claude_desktop_config.json",
|
|
367
|
+
Path.home() / "AppData" / "Roaming" / "Claude" / "claude_desktop_config.json",
|
|
368
|
+
]
|
|
369
|
+
for cfg_path in candidates:
|
|
370
|
+
if not cfg_path.exists():
|
|
371
|
+
continue
|
|
372
|
+
try:
|
|
373
|
+
cfg = json.loads(cfg_path.read_text())
|
|
374
|
+
except (json.JSONDecodeError, OSError):
|
|
375
|
+
cfg = {}
|
|
376
|
+
current = cfg.get("apiBaseUrl", "")
|
|
377
|
+
if current == proxy_url:
|
|
378
|
+
print(f" {GRAY}Claude Desktop proxy already set → {proxy_url}{RESET}")
|
|
379
|
+
continue
|
|
380
|
+
cfg["apiBaseUrl"] = proxy_url
|
|
381
|
+
cfg_path.write_text(json.dumps(cfg, indent=2))
|
|
382
|
+
print(f" {GREEN}Claude Desktop proxy set → {proxy_url}{RESET}")
|
|
383
|
+
print(f" {YELLOW}Restart Claude Desktop for proxy routing to take effect{RESET}")
|
|
384
|
+
|
|
349
385
|
|
|
350
386
|
def _install_codex_hook(hook_path: Path) -> None:
|
|
351
387
|
"""Register PreToolUse and PostToolUse hooks in ~/.codex/hooks.json."""
|
|
@@ -1091,7 +1127,7 @@ def cmd_guard_sync(args):
|
|
|
1091
1127
|
CONDUCT_DIR = Path.home() / ".conduct"
|
|
1092
1128
|
PROXY_ENV_FILE = CONDUCT_DIR / "env"
|
|
1093
1129
|
PROXY_OVERRIDE = CONDUCT_DIR / "env-override"
|
|
1094
|
-
DEFAULT_PROXY_URL = "https://api.conductai.ai/proxy"
|
|
1130
|
+
DEFAULT_PROXY_URL = "https://api.conductai.ai/proxy/anthropic"
|
|
1095
1131
|
SHELL_RC_MARKER = "# Conduct Guard Proxy — managed by `conduct guard sync`"
|
|
1096
1132
|
SHELL_SOURCE_LINE = "[ -f ~/.conduct/env ] && . ~/.conduct/env"
|
|
1097
1133
|
|
|
@@ -1679,7 +1715,7 @@ def register_guard_parser(sub):
|
|
|
1679
1715
|
sync_p.add_argument("--cursor", action="store_true", help="Write active Guard policies to .cursorrules")
|
|
1680
1716
|
sync_p.add_argument("--dry-run", action="store_true", help="Preview policy changes without writing anything")
|
|
1681
1717
|
sync_p.add_argument("--proxy-url", default=None,
|
|
1682
|
-
help="Override the Guard proxy URL (default: https://api.conductai.ai/proxy)")
|
|
1718
|
+
help="Override the Guard proxy URL (default: https://api.conductai.ai/proxy/anthropic)")
|
|
1683
1719
|
sync_p.add_argument("--no-local-audit", action="store_true",
|
|
1684
1720
|
help="Skip the local pre-existing API key scan")
|
|
1685
1721
|
|
|
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
|