conduct-cli 0.4.2__tar.gz → 0.4.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: CLI for Conduct AI — 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.4.2"
7
+ version = "0.4.3"
8
8
  description = "CLI for Conduct AI — install agents, manage projects, run tests"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -111,6 +111,20 @@ def _check_policy(tool_name, tool_input):
111
111
  return None, "allow", None, None
112
112
 
113
113
 
114
+ def _detect_ai_tool():
115
+ import os
116
+ if os.environ.get("CLAUDECODE") or os.environ.get("CLAUDE_CODE_ENTRYPOINT"):
117
+ return "claude-code"
118
+ path = os.environ.get("PATH", "")
119
+ if "Codex.app" in path or "codex" in path.lower():
120
+ return "codex"
121
+ if "cursor" in path.lower():
122
+ return "cursor"
123
+ if "windsurf" in path.lower():
124
+ return "windsurf"
125
+ return "unknown"
126
+
127
+
114
128
  def _post_event(tool_name, tool_input, decision, rule_id=None, message=None):
115
129
  try:
116
130
  cfg = json.loads(CONFIG_PATH.read_text()) if CONFIG_PATH.exists() else {}
@@ -124,7 +138,7 @@ def _post_event(tool_name, tool_input, decision, rule_id=None, message=None):
124
138
  "workspace_id": workspace_id,
125
139
  "clerk_user_id": cfg.get("user_email"),
126
140
  "user_email": cfg.get("user_email"),
127
- "ai_tool": "claude-code",
141
+ "ai_tool": _detect_ai_tool(),
128
142
  "tool_call": tool_name,
129
143
  "input_summary": json.dumps(tool_input)[:200],
130
144
  "decision": decision,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: CLI for Conduct AI — 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