conduct-cli 0.6.4__tar.gz → 0.6.5__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 (32) hide show
  1. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/PKG-INFO +1 -1
  2. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/pyproject.toml +1 -1
  3. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/hook_template.py +15 -4
  4. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli.egg-info/PKG-INFO +1 -1
  5. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/README.md +0 -0
  6. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/setup.cfg +0 -0
  7. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/setup.py +0 -0
  8. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/__init__.py +0 -0
  9. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/api.py +0 -0
  10. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/guard.py +0 -0
  11. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/guardmcp.py +0 -0
  12. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/hook_precompact_template.py +0 -0
  13. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/hook_session_start_template.py +0 -0
  14. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/hook_stop_template.py +0 -0
  15. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/log_util.py +0 -0
  16. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/main.py +0 -0
  17. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/mcp_server.py +0 -0
  18. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/memory.py +0 -0
  19. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli/paxel.py +0 -0
  20. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
  21. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
  22. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli.egg-info/entry_points.txt +0 -0
  23. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli.egg-info/requires.txt +0 -0
  24. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/src/conduct_cli.egg-info/top_level.txt +0 -0
  25. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/tests/test_bash_operator_signature.py +0 -0
  26. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/tests/test_command_word_matcher.py +0 -0
  27. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/tests/test_guard_policy.py +0 -0
  28. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/tests/test_guard_savings.py +0 -0
  29. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/tests/test_hook_syntax.py +0 -0
  30. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/tests/test_log_util.py +0 -0
  31. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/tests/test_proxy_env.py +0 -0
  32. {conduct_cli-0.6.4 → conduct_cli-0.6.5}/tests/test_switch.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.6.4
3
+ Version: 0.6.5
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.6.4"
7
+ version = "0.6.5"
8
8
  description = "CLI for Conduct AI — install agents, manage projects, run tests"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -343,8 +343,18 @@ def _detect_repo(): # -> Optional[str]
343
343
 
344
344
  def _detect_ai_tool():
345
345
  import os
346
- if os.environ.get("CLAUDECODE") or os.environ.get("CLAUDE_CODE_ENTRYPOINT"):
346
+ # Explicit env vars — most reliable, set by the tool itself
347
+ if os.environ.get("CLAUDE_CODE_ENTRYPOINT") or os.environ.get("CLAUDECODE"):
347
348
  return "claude-code"
349
+ if os.environ.get("CODEX_SESSION_ID") or os.environ.get("CODEX_CLI_VERSION"):
350
+ return "codex"
351
+ # TERM_PROGRAM is set by Cursor, Windsurf, and similar IDE terminals
352
+ term = os.environ.get("TERM_PROGRAM", "").lower()
353
+ if term == "cursor":
354
+ return "cursor"
355
+ if term == "windsurf":
356
+ return "windsurf"
357
+ # PATH-based fallback
348
358
  path = os.environ.get("PATH", "")
349
359
  if "Codex.app" in path or "codex" in path.lower():
350
360
  return "codex"
@@ -352,7 +362,7 @@ def _detect_ai_tool():
352
362
  return "cursor"
353
363
  if "windsurf" in path.lower():
354
364
  return "windsurf"
355
- return "unknown"
365
+ return "claude-code" # default — Claude Code is primary
356
366
 
357
367
 
358
368
  def _already_warned_this_session(session_id: str, rule_id: str) -> bool:
@@ -730,11 +740,12 @@ def post_usage_main():
730
740
  data = json.load(sys.stdin)
731
741
  except Exception:
732
742
  sys.exit(0)
733
- session_id = data.get("session_id")
734
743
  tool_name = (data.get("tool_name") or "").lower()
735
744
  tool_use_id = data.get("tool_use_id")
736
745
  transcript_path = data.get("transcript_path")
737
- is_codex = (tool_use_id or "").startswith("call_")
746
+ is_codex = (tool_use_id or "").startswith("call_")
747
+ # Codex sends transcript_path but not session_id — use path as stable session key
748
+ session_id = data.get("session_id") or (f"transcript:{transcript_path}" if transcript_path else None)
738
749
 
739
750
  if is_codex and transcript_path:
740
751
  # Write pending args; spawn delayed background reader so hook exits instantly
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.6.4
3
+ Version: 0.6.5
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