conduct-cli 0.4.28__tar.gz → 0.4.29__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.28 → conduct_cli-0.4.29}/PKG-INFO +1 -1
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/pyproject.toml +1 -1
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli/main.py +78 -11
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/README.md +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/setup.cfg +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/setup.py +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli/guard.py +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli/guardmcp.py +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli/mcp_server.py +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.4.28 → conduct_cli-0.4.29}/src/conduct_cli.egg-info/top_level.txt +0 -0
|
@@ -217,7 +217,7 @@ def _write_codex_mcp_config() -> bool:
|
|
|
217
217
|
try:
|
|
218
218
|
content = config_path.read_text() if config_path.exists() else ""
|
|
219
219
|
if "conduct-mcp" in content:
|
|
220
|
-
return True
|
|
220
|
+
return True
|
|
221
221
|
mcp_block = '\n[[mcp_servers]]\nname = "conduct"\ncommand = "conduct-mcp"\nargs = []\n'
|
|
222
222
|
config_path.write_text(content + mcp_block)
|
|
223
223
|
return True
|
|
@@ -225,8 +225,66 @@ def _write_codex_mcp_config() -> bool:
|
|
|
225
225
|
return False
|
|
226
226
|
|
|
227
227
|
|
|
228
|
+
def _write_cursor_mcp_config() -> bool:
|
|
229
|
+
"""Write conduct-mcp into ~/.cursor/mcp.json. Returns True if written."""
|
|
230
|
+
cursor_dir = Path.home() / ".cursor"
|
|
231
|
+
if not cursor_dir.exists():
|
|
232
|
+
return False
|
|
233
|
+
config_path = cursor_dir / "mcp.json"
|
|
234
|
+
try:
|
|
235
|
+
existing = json.loads(config_path.read_text()) if config_path.exists() else {}
|
|
236
|
+
servers = existing.setdefault("mcpServers", {})
|
|
237
|
+
if "conduct" in servers:
|
|
238
|
+
return True
|
|
239
|
+
servers["conduct"] = {"command": "conduct-mcp", "args": []}
|
|
240
|
+
config_path.write_text(json.dumps(existing, indent=2))
|
|
241
|
+
return True
|
|
242
|
+
except Exception:
|
|
243
|
+
return False
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _write_windsurf_mcp_config() -> bool:
|
|
247
|
+
"""Write conduct-mcp into ~/.codeium/windsurf/mcp_config.json. Returns True if written."""
|
|
248
|
+
config_path = Path.home() / ".codeium" / "windsurf" / "mcp_config.json"
|
|
249
|
+
if not config_path.parent.exists():
|
|
250
|
+
return False
|
|
251
|
+
try:
|
|
252
|
+
existing = json.loads(config_path.read_text()) if config_path.exists() else {}
|
|
253
|
+
servers = existing.setdefault("mcpServers", {})
|
|
254
|
+
if "conduct" in servers:
|
|
255
|
+
return True
|
|
256
|
+
servers["conduct"] = {"command": "conduct-mcp", "args": []}
|
|
257
|
+
config_path.write_text(json.dumps(existing, indent=2))
|
|
258
|
+
return True
|
|
259
|
+
except Exception:
|
|
260
|
+
return False
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def _write_vscode_mcp_config() -> bool:
|
|
264
|
+
"""Write conduct-mcp into VS Code settings.json (mcp.servers). Returns True if written."""
|
|
265
|
+
# Check both standard locations
|
|
266
|
+
candidates = [
|
|
267
|
+
Path.home() / ".vscode" / "settings.json",
|
|
268
|
+
Path.home() / "Library" / "Application Support" / "Code" / "User" / "settings.json",
|
|
269
|
+
Path.home() / ".config" / "Code" / "User" / "settings.json",
|
|
270
|
+
]
|
|
271
|
+
settings_path = next((p for p in candidates if p.exists()), None)
|
|
272
|
+
if not settings_path:
|
|
273
|
+
return False
|
|
274
|
+
try:
|
|
275
|
+
existing = json.loads(settings_path.read_text()) if settings_path.exists() else {}
|
|
276
|
+
servers = existing.setdefault("mcp", {}).setdefault("servers", {})
|
|
277
|
+
if "conduct" in servers:
|
|
278
|
+
return True
|
|
279
|
+
servers["conduct"] = {"command": "conduct-mcp", "args": []}
|
|
280
|
+
settings_path.write_text(json.dumps(existing, indent=2))
|
|
281
|
+
return True
|
|
282
|
+
except Exception:
|
|
283
|
+
return False
|
|
284
|
+
|
|
285
|
+
|
|
228
286
|
def cmd_mcp_install(args):
|
|
229
|
-
"""Register conduct-mcp in Claude Code and
|
|
287
|
+
"""Register conduct-mcp in Claude Code, Codex, Cursor, Windsurf, and VS Code."""
|
|
230
288
|
import shutil
|
|
231
289
|
import subprocess
|
|
232
290
|
|
|
@@ -242,29 +300,38 @@ def cmd_mcp_install(args):
|
|
|
242
300
|
if result.returncode == 0:
|
|
243
301
|
registered.append("Claude Code")
|
|
244
302
|
else:
|
|
245
|
-
# claude mcp add is idempotent; also try writing settings.json directly as fallback
|
|
246
303
|
_write_claude_mcp_settings()
|
|
247
304
|
registered.append("Claude Code (settings.json)")
|
|
248
305
|
except Exception:
|
|
249
306
|
_write_claude_mcp_settings()
|
|
250
307
|
registered.append("Claude Code (settings.json)")
|
|
251
308
|
else:
|
|
252
|
-
|
|
253
|
-
written = _write_claude_mcp_settings()
|
|
254
|
-
if written:
|
|
309
|
+
if _write_claude_mcp_settings():
|
|
255
310
|
registered.append("Claude Code (settings.json)")
|
|
256
311
|
|
|
257
312
|
# --- Codex CLI ---
|
|
258
|
-
|
|
259
|
-
if written:
|
|
313
|
+
if _write_codex_mcp_config():
|
|
260
314
|
registered.append("Codex")
|
|
261
315
|
|
|
316
|
+
# --- Cursor ---
|
|
317
|
+
if _write_cursor_mcp_config():
|
|
318
|
+
registered.append("Cursor")
|
|
319
|
+
|
|
320
|
+
# --- Windsurf ---
|
|
321
|
+
if _write_windsurf_mcp_config():
|
|
322
|
+
registered.append("Windsurf")
|
|
323
|
+
|
|
324
|
+
# --- VS Code (Copilot) ---
|
|
325
|
+
if _write_vscode_mcp_config():
|
|
326
|
+
registered.append("VS Code (Copilot)")
|
|
327
|
+
|
|
262
328
|
if registered:
|
|
263
329
|
print(f"{GREEN}✓ conduct-mcp registered in: {', '.join(registered)}{RESET}")
|
|
264
|
-
print(f"{GRAY} Restart
|
|
330
|
+
print(f"{GRAY} Restart your AI tools to pick up the new MCP server.{RESET}")
|
|
265
331
|
else:
|
|
266
|
-
print(f"{YELLOW}⚠ No supported AI tools detected
|
|
267
|
-
print(f"{GRAY}
|
|
332
|
+
print(f"{YELLOW}⚠ No supported AI tools detected on this machine.{RESET}")
|
|
333
|
+
print(f"{GRAY} Supported: Claude Code, Codex, Cursor, Windsurf, VS Code{RESET}")
|
|
334
|
+
print(f"{GRAY} After installing any of these, re-run: conduct mcp install{RESET}")
|
|
268
335
|
|
|
269
336
|
|
|
270
337
|
def cmd_login(args):
|
|
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
|