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.
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/PKG-INFO +1 -1
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/pyproject.toml +1 -1
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli/guard.py +15 -1
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli.egg-info/PKG-INFO +1 -1
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/README.md +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/setup.cfg +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/setup.py +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli/__init__.py +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli/api.py +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli/guardmcp.py +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli/main.py +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli.egg-info/entry_points.txt +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli.egg-info/requires.txt +0 -0
- {conduct_cli-0.4.2 → conduct_cli-0.4.3}/src/conduct_cli.egg-info/top_level.txt +0 -0
|
@@ -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":
|
|
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,
|
|
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
|