conduct-cli 0.7.1__tar.gz → 0.7.3__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.
Files changed (39) hide show
  1. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/PKG-INFO +1 -1
  2. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/pyproject.toml +1 -1
  3. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/guard.py +16 -4
  4. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli.egg-info/PKG-INFO +1 -1
  5. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/README.md +0 -0
  6. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/setup.cfg +0 -0
  7. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/setup.py +0 -0
  8. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/__init__.py +0 -0
  9. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/api.py +0 -0
  10. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/guardmcp.py +0 -0
  11. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/hooks/__init__.py +0 -0
  12. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/hooks/base.py +0 -0
  13. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/hooks/posttooluse.py +0 -0
  14. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/hooks/precompact.py +0 -0
  15. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/hooks/pretooluse.py +0 -0
  16. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/hooks/session_parser.py +0 -0
  17. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/hooks/session_start.py +0 -0
  18. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/hooks/stop.py +0 -0
  19. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/log_util.py +0 -0
  20. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/main.py +0 -0
  21. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/mcp_server.py +0 -0
  22. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/memory.py +0 -0
  23. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli/paxel.py +0 -0
  24. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
  25. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
  26. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli.egg-info/entry_points.txt +0 -0
  27. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli.egg-info/requires.txt +0 -0
  28. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/src/conduct_cli.egg-info/top_level.txt +0 -0
  29. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_advisory_and_hook.py +0 -0
  30. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_bash_operator_signature.py +0 -0
  31. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_command_word_matcher.py +0 -0
  32. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_guard_policy.py +0 -0
  33. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_guard_savings.py +0 -0
  34. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_hook_syntax.py +0 -0
  35. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_journal_drain.py +0 -0
  36. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_log_util.py +0 -0
  37. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_proxy_env.py +0 -0
  38. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_signed_policy.py +0 -0
  39. {conduct_cli-0.7.1 → conduct_cli-0.7.3}/tests/test_switch.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.7.1
3
+ Version: 0.7.3
4
4
  Summary: CLI for Conduct AI — secure, govern, 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.7.1"
7
+ version = "0.7.3"
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" }
@@ -1927,16 +1927,28 @@ def _discover_config_agents() -> list[tuple]:
1927
1927
 
1928
1928
  def _mcp_registered(path: Path) -> bool:
1929
1929
  try:
1930
+ if not path.exists():
1931
+ return False
1932
+ text = path.read_text()
1933
+ if path.suffix == ".toml":
1934
+ # conduct-mcp or conductai in mcp_servers section
1935
+ return "conduct" in text and "mcp_servers" in text
1930
1936
  import json as _j
1931
- d = _j.loads(path.read_text()) if path.exists() else {}
1937
+ d = _j.loads(text)
1932
1938
  return "conduct" in d.get("mcpServers", {})
1933
1939
  except Exception:
1934
1940
  return False
1935
1941
 
1936
1942
  def _hook_registered(path: Path) -> bool:
1937
1943
  try:
1944
+ if not path.exists():
1945
+ # Codex: check hooks.json sibling
1946
+ hooks_path = path.parent / "hooks.json"
1947
+ if hooks_path.exists():
1948
+ return "conductguard" in hooks_path.read_text()
1949
+ return False
1938
1950
  import json as _j
1939
- d = _j.loads(path.read_text()) if path.exists() else {}
1951
+ d = _j.loads(path.read_text())
1940
1952
  hooks = d.get("hooks", {})
1941
1953
  return any("conductguard" in str(h).lower() or "conduct" in str(h).lower()
1942
1954
  for h in hooks.get("PreToolUse", []))
@@ -1946,7 +1958,7 @@ def _discover_config_agents() -> list[tuple]:
1946
1958
  # Known tool config locations
1947
1959
  TOOLS = [
1948
1960
  ("claude-code", home / ".claude", home / ".claude" / "settings.json", "mcp"),
1949
- ("codex", home / ".codex", home / ".codex" / "mcp.json", "mcp"),
1961
+ ("codex", home / ".codex", home / ".codex" / "config.toml", "mcp"),
1950
1962
  ("cursor", home / ".cursor", home / ".cursor" / "mcp.json", "mcp"),
1951
1963
  ("windsurf", home / ".codeium" / "windsurf", home / ".codeium" / "windsurf" / "mcp_config.json", "mcp"),
1952
1964
  ]
@@ -2539,7 +2551,7 @@ def cmd_verify(args) -> None:
2539
2551
  rule_id = ev.get("rule_id") or ev.get("rule_message") or ""
2540
2552
  owasp_code, owasp_title = _map_owasp(rule_id)
2541
2553
  findings.append({
2542
- "timestamp": (ev.get("timestamp") or ev.get("created_at") or "")[:19].replace("T", " ") or "—",
2554
+ "timestamp": (ev.get("ts") or ev.get("timestamp") or ev.get("created_at") or "")[:19].replace("T", " ") or "—",
2543
2555
  "tool": ev.get("ai_tool") or "—",
2544
2556
  "action": (ev.get("tool_call") or "—")[:40],
2545
2557
  "decision": decision,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.7.1
3
+ Version: 0.7.3
4
4
  Summary: CLI for Conduct AI — secure, govern, 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