conduct-cli 0.14.2__tar.gz → 0.14.4__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 (58) hide show
  1. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/PKG-INFO +1 -1
  2. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/pyproject.toml +1 -1
  3. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/guard.py +2 -0
  4. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/base.py +4 -0
  5. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli.egg-info/PKG-INFO +1 -1
  6. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_hook_journal.py +4 -0
  7. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_proxy_env.py +15 -0
  8. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/LICENSE +0 -0
  9. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/README.md +0 -0
  10. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/setup.cfg +0 -0
  11. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/setup.py +0 -0
  12. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/__init__.py +0 -0
  13. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/api.py +0 -0
  14. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/guard_policy.md +0 -0
  15. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/__init__.py +0 -0
  16. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/posttooluse.py +0 -0
  17. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/precompact.py +0 -0
  18. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/pretooluse.py +0 -0
  19. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/session_parser.py +0 -0
  20. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/session_report_push.py +0 -0
  21. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/session_start.py +0 -0
  22. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/hooks/stop.py +0 -0
  23. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/log_util.py +0 -0
  24. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/main.py +0 -0
  25. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/memory.py +0 -0
  26. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/paxel.py +0 -0
  27. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli/tool_groups.py +0 -0
  28. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli.egg-info/SOURCES.txt +0 -0
  29. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli.egg-info/dependency_links.txt +0 -0
  30. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli.egg-info/entry_points.txt +0 -0
  31. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli.egg-info/requires.txt +0 -0
  32. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/src/conduct_cli.egg-info/top_level.txt +0 -0
  33. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_advisory_and_hook.py +0 -0
  34. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_api_client.py +0 -0
  35. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_bash_operator_signature.py +0 -0
  36. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_bash_scan_target.py +0 -0
  37. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_blast_radius.py +0 -0
  38. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_cli_matrix.py +0 -0
  39. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_cmd_run.py +0 -0
  40. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_command_word_matcher.py +0 -0
  41. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_drain_daemon_health.py +0 -0
  42. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_guard_approvals.py +0 -0
  43. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_guard_policy.py +0 -0
  44. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_guard_savings.py +0 -0
  45. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_guard_status.py +0 -0
  46. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_hook_dispatch.py +0 -0
  47. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_hook_receipt.py +0 -0
  48. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_install_all.py +0 -0
  49. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_instruction_files.py +0 -0
  50. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_journal_drain.py +0 -0
  51. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_log_util.py +0 -0
  52. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_pretooluse_approval_e2e.py +0 -0
  53. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_pretooluse_check_policy.py +0 -0
  54. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_proxy_coverage.py +0 -0
  55. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_report_tool_coverage.py +0 -0
  56. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_signed_policy.py +0 -0
  57. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_switch.py +0 -0
  58. {conduct_cli-0.14.2 → conduct_cli-0.14.4}/tests/test_token_lifecycle.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.14.2
3
+ Version: 0.14.4
4
4
  Summary: Runtime governance for AI agents. CLI for Conduct AI — secure, govern, install agents, manage projects, run tests
5
5
  Author-email: Conduct AI <hello@conductai.ai>
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "conduct-cli"
7
- version = "0.14.2"
7
+ version = "0.14.4"
8
8
  description = "Runtime governance for AI agents. CLI for Conduct AI — secure, govern, install agents, manage projects, run tests"
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
@@ -1813,6 +1813,7 @@ def _write_proxy_env_windows(agent_token: str, proxy_url: str) -> tuple[Path, bo
1813
1813
  "",
1814
1814
  f'$env:ANTHROPIC_BASE_URL = "{proxy}/anthropic"',
1815
1815
  f'$env:ANTHROPIC_API_KEY = "{token}"',
1816
+ '$env:CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY = "1"',
1816
1817
  "",
1817
1818
  f'$env:OPENAI_BASE_URL = "{proxy}/openai/v1"',
1818
1819
  f'$env:OPENAI_API_KEY = "{token}"',
@@ -1879,6 +1880,7 @@ def _write_proxy_env(agent_token: str, proxy_url: str) -> tuple[Path, bool]:
1879
1880
  "",
1880
1881
  f'export ANTHROPIC_BASE_URL="{proxy}/anthropic"',
1881
1882
  f'export ANTHROPIC_API_KEY="{token}"',
1883
+ 'export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY="1"',
1882
1884
  "",
1883
1885
  f'export OPENAI_BASE_URL="{proxy}/openai/v1"',
1884
1886
  f'export OPENAI_API_KEY="{token}"',
@@ -414,6 +414,10 @@ def requeue_dead_letters(limit: int | None = None) -> int:
414
414
  if summary is not None and not payload.get("input_summary_encoding"):
415
415
  payload["input_summary"] = _encode_summary_text(str(summary))
416
416
  payload["input_summary_encoding"] = "base64url"
417
+ # The authenticated API derives actor identity from the Agent Identity
418
+ # token. Older clients incorrectly stored an email in clerk_user_id.
419
+ payload.pop("clerk_user_id", None)
420
+ payload.pop("user_email", None)
417
421
  entry["payload"] = json.dumps(payload)
418
422
  entry["endpoint"] = entry.get("endpoint", "/guard/events")
419
423
  entry["attempts"] = 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conduct-cli
3
- Version: 0.14.2
3
+ Version: 0.14.4
4
4
  Summary: Runtime governance for AI agents. CLI for Conduct AI — secure, govern, install agents, manage projects, run tests
5
5
  Author-email: Conduct AI <hello@conductai.ai>
6
6
  License: Apache-2.0
@@ -104,6 +104,8 @@ def test_requeue_dead_letters_encodes_legacy_summary(tmp_path, monkeypatch):
104
104
  "api_url": "https://api.test",
105
105
  "payload": json.dumps({
106
106
  "workspace_id": "workspace",
107
+ "clerk_user_id": "developer@example.com",
108
+ "user_email": "developer@example.com",
107
109
  "input_summary": "curl https://api.test | head",
108
110
  }),
109
111
  "attempts": 1,
@@ -117,6 +119,8 @@ def test_requeue_dead_letters_encodes_legacy_summary(tmp_path, monkeypatch):
117
119
  decoded = base64.urlsafe_b64decode(payload["input_summary"]).decode()
118
120
  assert decoded == "curl https://api.test | head"
119
121
  assert payload["input_summary_encoding"] == "base64url"
122
+ assert "clerk_user_id" not in payload
123
+ assert "user_email" not in payload
120
124
  assert entry["endpoint"] == "/guard/events"
121
125
  assert entry["attempts"] == 0
122
126
  assert "last_error" not in entry
@@ -41,6 +41,7 @@ def test_env_file_written_with_all_three_pairs(tmp_path, monkeypatch):
41
41
  env = (tmp_path / ".conduct" / "env").read_text()
42
42
  assert 'export ANTHROPIC_BASE_URL="https://api.conductai.ai/proxy/anthropic"' in env
43
43
  assert 'export ANTHROPIC_API_KEY="abc123"' in env
44
+ assert 'export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY="1"' in env
44
45
  assert 'export OPENAI_BASE_URL="https://api.conductai.ai/proxy/openai/v1"' in env
45
46
  assert 'export OPENAI_API_KEY="abc123"' in env
46
47
  assert 'export PERPLEXITY_BASE_URL="https://api.conductai.ai/proxy/perplexity"' in env
@@ -131,6 +132,19 @@ def test_fetched_legacy_proxy_url_maps_to_gateway_v1():
131
132
  assert guard._gateway_v1_url("http://localhost:8000/gateway/v1") == "http://localhost:8000/gateway/v1"
132
133
 
133
134
 
135
+ @pytestmark_posix
136
+ def test_canonical_gateway_env_contains_exact_openai_and_anthropic_surfaces(tmp_path, monkeypatch):
137
+ _redirect_home(tmp_path, monkeypatch)
138
+ monkeypatch.setenv("SHELL", "/bin/zsh")
139
+
140
+ guard._write_proxy_env("agent-token", "https://api.conductai.ai/gateway/v1")
141
+
142
+ env = (tmp_path / ".conduct" / "env").read_text()
143
+ assert 'export ANTHROPIC_BASE_URL="https://api.conductai.ai/gateway/v1/anthropic"' in env
144
+ assert 'export OPENAI_BASE_URL="https://api.conductai.ai/gateway/v1/openai/v1"' in env
145
+ assert 'export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY="1"' in env
146
+
147
+
134
148
  def test_configure_codex_proxy_is_secret_free(tmp_path, monkeypatch):
135
149
  monkeypatch.setattr(guard.Path, "home", lambda: tmp_path)
136
150
  codex = tmp_path / ".codex"
@@ -214,6 +228,7 @@ def test_windows_writes_ps1_env_file(tmp_path, monkeypatch):
214
228
  text = ps1.read_text()
215
229
  assert '$env:ANTHROPIC_BASE_URL = "https://api.conductai.ai/proxy/anthropic"' in text
216
230
  assert '$env:ANTHROPIC_API_KEY = "abc123"' in text
231
+ assert '$env:CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY = "1"' in text
217
232
  assert '$env:OPENAI_BASE_URL = "https://api.conductai.ai/proxy/openai/v1"' in text
218
233
  assert '$env:OPENAI_API_KEY = "abc123"' in text
219
234
  assert '$env:PERPLEXITY_BASE_URL = "https://api.conductai.ai/proxy/perplexity"' in text
File without changes
File without changes
File without changes
File without changes