conduct-cli 0.4.21__tar.gz → 0.4.23__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.21 → conduct_cli-0.4.23}/PKG-INFO +1 -1
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/pyproject.toml +1 -1
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli/guard.py +7 -6
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli/guardmcp.py +7 -5
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/README.md +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/setup.cfg +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/setup.py +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli/main.py +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.4.21 → conduct_cli-0.4.23}/src/conduct_cli.egg-info/top_level.txt +0 -0
|
@@ -479,11 +479,12 @@ _MCP_TARGETS = [
|
|
|
479
479
|
|
|
480
480
|
|
|
481
481
|
def _register_mcp(workspace_id: str, member_token: str, api_url: str) -> None:
|
|
482
|
-
"""Write conductguard MCP entry into every AI tool config found on this machine.
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
482
|
+
"""Write conductguard MCP entry into every AI tool config found on this machine.
|
|
483
|
+
|
|
484
|
+
Credentials are NOT stored in the MCP config — the server reads them from
|
|
485
|
+
~/.conductguard/config.json at startup, which is already written by guard join.
|
|
486
|
+
"""
|
|
487
|
+
entry = {"command": "conductguard-mcp"}
|
|
487
488
|
found_any = False
|
|
488
489
|
for cfg_path, label in _MCP_TARGETS:
|
|
489
490
|
if not cfg_path.exists():
|
|
@@ -494,7 +495,7 @@ def _register_mcp(workspace_id: str, member_token: str, api_url: str) -> None:
|
|
|
494
495
|
except (json.JSONDecodeError, OSError):
|
|
495
496
|
existing = {}
|
|
496
497
|
mcp = existing.setdefault("mcpServers", {})
|
|
497
|
-
if mcp.get("conductguard"
|
|
498
|
+
if mcp.get("conductguard") == entry:
|
|
498
499
|
print(f" {GRAY}Guard MCP already registered in {label}{RESET}")
|
|
499
500
|
continue
|
|
500
501
|
mcp["conductguard"] = entry
|
|
@@ -11,6 +11,7 @@ Exposes three tools:
|
|
|
11
11
|
guard_check — check whether a tool call would be blocked by policy
|
|
12
12
|
guard_sync — pull latest policy from the ConductGuard API
|
|
13
13
|
"""
|
|
14
|
+
from __future__ import annotations
|
|
14
15
|
import argparse
|
|
15
16
|
import json
|
|
16
17
|
import re
|
|
@@ -208,13 +209,14 @@ def _err(msg_id, code: int, message: str) -> None:
|
|
|
208
209
|
|
|
209
210
|
def main() -> None:
|
|
210
211
|
parser = argparse.ArgumentParser(prog="conductguard-mcp")
|
|
211
|
-
parser.add_argument("--workspace",
|
|
212
|
-
parser.add_argument("--token",
|
|
213
|
-
parser.add_argument("--api-url", default=
|
|
212
|
+
parser.add_argument("--workspace", default=None, help="Guard workspace ID (falls back to ~/.conductguard/config.json)")
|
|
213
|
+
parser.add_argument("--token", default=None, help="Member token (falls back to ~/.conductguard/config.json)")
|
|
214
|
+
parser.add_argument("--api-url", default=None, help=argparse.SUPPRESS)
|
|
214
215
|
args = parser.parse_args()
|
|
215
216
|
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
cfg = _load_config()
|
|
218
|
+
workspace_id = args.workspace or cfg.get("workspace_id", "")
|
|
219
|
+
token = args.token or cfg.get("member_token", "")
|
|
218
220
|
|
|
219
221
|
for raw in sys.stdin:
|
|
220
222
|
raw = raw.strip()
|
|
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
|